I am suddenly getting this error in development and in production on deployment.
custom.css.scss
@import \"bootstrap-sprockets\";
@import \"bootstrap
This is how I solved the issue.
Go to Bootstrap for Sass Github page and follow the instructions:
Add the following to the Gemfile
gem 'bootstrap-sass', '~> 3.3.6' gem 'sass-rails', '>= 3.2'
Run the command
bundle install
Start/restart the server
rails s
Also, make sure the file has .scss extension (or .sass for Sass syntax). If you have just generated a new Rails app, it may come with a .css file instead. If this file exists, it will be served instead of Sass, so rename it. Then, remove all the *= require_self and *= require_tree . statements from the sass file. Instead, use @import to import Sass files.
After making changes to Gemfile, do not forget to restart the server with rails s
Restarting the rails server worked like a charm! :D
I solved this issue by upgrading bootstrap-sass
gem 'bootstrap-sass', '3.2.0.2'
put this in gem file
gem 'bootstrap-sass', '~> 3.3.5'
gem 'sass-rails', '>= 3.2'
then run $ bundle install
Restart the server.
I have observed the same behaviour. In my case i have removed the version of the gem 'bootstap-sass' and it worked. There might be compatibility issue with the gem version which was causing the problem.
Gem file
gem 'bootstrap-sass'
After making changes in the gem file perform following commands:
bundle install
If the server is already running then stop it by "CTRL+C" and start the server again
rails s
This error mostly comes in rails 3.2.x versions. If you are using rails version 3.2 you have to specify a special version in your gem file like below:
gem 'rails', '3.2.0'
gem 'bootstrap-sass', '3.2.0.2'
It will resolve the problem for rails -v '3.2.0'