Ruby on rails 带Rails 5的Bootstrap4
我跟着那条路走了,没有人帮忙,有人能解释一下吗?() 我的Gem文件:Ruby on rails 带Rails 5的Bootstrap4,ruby-on-rails,ruby,twitter-bootstrap,twitter-bootstrap-4,bootstrap-4,Ruby On Rails,Ruby,Twitter Bootstrap,Twitter Bootstrap 4,Bootstrap 4,我跟着那条路走了,没有人帮忙,有人能解释一下吗?() 我的Gem文件: ... #bootstrap gem 'bootstrap', '~> 4.0.0.alpha3.1' gem 'sprockets-rails', :require => 'sprockets/railtie' source 'https://rails-assets.org' do gem 'rails-assets-tether', '>= 1.1.0' end ... my applicat
...
#bootstrap
gem 'bootstrap', '~> 4.0.0.alpha3.1'
gem 'sprockets-rails', :require => 'sprockets/railtie'
source 'https://rails-assets.org' do
gem 'rails-assets-tether', '>= 1.1.0'
end
...
my application.scss:
@import 'bootstrap-sprockets';
@import 'bootstrap';
my application.js:
//= require jquery
//= require tether
//= require bootstrap-sprockets
//= require jquery_ujs
//= require turbolinks
//= require_tree .
my application.html.erb:
<!DOCTYPE html>
<html>
<head>
<title>DankDist</title>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
<body>
<%= yield %>
</body>
</html>
<h1>Scale#index</h1>
<div class="alert alert-success" role="alert">
<strong>Well done!</strong> You successfully read this important alert message.
</div>
<p>Hello Worldzz</p>
<p>Find me in app/views/scale/index.html.erb</p>
<%= params[:id] %> <br/>
<%= @id %>
Next Page <%= @page +1 %>
<hr/>
<%= params.inspect %>
丹麦人
最后,我的index.html.erb:
<!DOCTYPE html>
<html>
<head>
<title>DankDist</title>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
<body>
<%= yield %>
</body>
</html>
<h1>Scale#index</h1>
<div class="alert alert-success" role="alert">
<strong>Well done!</strong> You successfully read this important alert message.
</div>
<p>Hello Worldzz</p>
<p>Find me in app/views/scale/index.html.erb</p>
<%= params[:id] %> <br/>
<%= @id %>
Next Page <%= @page +1 %>
<hr/>
<%= params.inspect %>
Scale#索引
干得好您已成功阅读此重要警报消息。
你好,沃兹
在app/views/scale/index.html.erb中查找我
下一页
我运行了Bundle,并重新尝试了rails s
,没有任何更改,标题不包含任何样式。有一些错误
在application.js中,尝试按如下方式排列这两行,我注意到它对我很有用:
//= require jquery
//= require bootstrap-sprockets
你仍然需要你的树。在application.css.scss中。将scss重命名为css.scss,然后添加/*=require….*/我把绳子忘在里面了。参考我的帖子,仍然不起作用,你不应该使用引导sass吗?它只适用于引导P2和3哦,是的。嗯,那我不确定。还没有签出引导程序4。如果没有人回答,我明天就去试试,让你知道!