부트 캐스트에 대해 더 많은 것을 알기 위해 screencast를 twitter bootstrap basics에 따라 왔지만, 어떤 이유로 localhost에 갈 때, 내 앱에는 스타일이 없습니다.트위터 부트 스트랩이 레일에서 작동하지 않습니다.
나는 github repo https://github.com/seyhunak/twitter-bootstrap-rails에서도 단계를 시도했다.
나는 또한 this SO post의 지시를 따랐지만, *= require bootstrap_and_overrides
줄을 추가하면 FileNotFound
오류가 표시됩니다.
rails g scaffold Product name price:decimal --skip-stylesheets
rake db:migrate
# added gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git' on gemfile (I have also tried just gem 'twitter-bootstrap-rails'
bundle install
rails g bootstrap:install
내가 자산을 확인하고 필요한 자산을 가지고 여기에
후 새로운 응용 프로그램 bootstrap_practice
레일, 내가 한 것입니다.
스타일 시트 (application.css)
*
*= require_tree .
*= require_self
*/
JS :
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require turbolinks
//= require_tree .
마지막으로, 내 application.html.erb 내가 그 모든 것을 필요로 꽤 확신
<%= csrf_meta_tags %>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
있다 . 왜 내 로컬 호스트의 응용 프로그램이 스타일이 지정되지 않았습니까?
작성자의 원본 보석을 사용하는 것이 더 좋습니다 :'https : // github.com/twbs/bootstrap-sass' 그것은 저에게 큰 도움이되었습니다 .. – liborza
''super twitter-bootstrap-rails 'gem vs'bootstrap-sass' gem? 그들은 본질적으로 같은 것을하고 있습니까 (스타일링),하지만 이전 보석 "비공식적 인"보석입니까? – Iggy
차이는 SASS를 사용하는 공식 보석이지만 덜 사용하고 있습니다. [SASS vs LESS] (http://www.zingdesign.com/less-vs-sass-its-time-to-switch-to-sass/) – liborza