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'
Please restart you rails server after every changes in Gemfile
rails server
For the Sass version of Bootstrap 5 in versions of rails before 6 use
gem `bootstrap`
For Sass versions of Bootstrap 3 and 2 Make sure you don't have
gem 'bootstrap' # Remove this line
gem 'bootstrap-sass'
It should just be
gem 'bootstrap-sass'
I solved it in following steps:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With