Bootstrap Integration gem with Rails 4 -
i attended hackathon, , made web application in rails. new rails , not aware of bootstrap gem, , hard coded bootstrap style sheet in assets folder.
in effort learn rails, further, i'm continuing app. have deleted .css file, , added gem gemfile. i've ran bundle install , imported files using '@import' command in css file.
when run rails server , navigate homepage, error:
sass::syntaxerror in pages#rootpage showing c:/users/user/documents/soapbox/app/views/layouts/application.html.erb line #6 raised: file import not found or unreadable: bootstrap. load paths: c:/users/soham/documents/soapbox/app/assets/images c:/users/soham/documents/soapbox/app/assets/javascripts c:/users/soham/documents/soapbox/app/assets/stylesheets c:/users/soham/documents/soapbox/vendor/assets/javascripts c:/users/soham/documents/soapbox/vendor/assets/stylesheets c:/railsinstaller/ruby1.9.3/lib/ruby/gems/1.9.1/gems/turbolinks-1.3.0/lib/assets/javascripts c:/railsinstaller/ruby1.9.3/lib/ruby/gems/1.9.1/gems/jquery-rails-3.0.4/vendor/assets/javascripts (in c:/users/soham/documents/soapbox/app/assets/stylesheets/styles.css.scss:2) `file import not found or unreadable: bootstrap`. <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href='http://fonts.googleapis.com/css?family=oswald:700,300' rel='stylesheet' type='text/css'> <%= favicon_link_tag "favicon.png", :type => "image/png", :rel => "icon" %> <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> <%= javascript_include_tag "application", "data-turbolinks-track" => true %> <%= csrf_meta_tags %>
don't understand why error occurring.
any appreciated!
thanks!
sohamk
i recommend watching this: railscast
it mentions installing bootstrap this:
#commandline rails g bootstrap:install
if doesn't work after try adding less file.
#css not scss @import "twitter/bootstrap/bootstrap";
remember, gem in less. importing less files scss file break.
Comments
Post a Comment