1

I am watching the old One Month Ruby on Rails lectures without being enrolled in the course and encountered this problem. I have searched through about 20 stackoverflow and github tutorials and can't find the problem, any help is greatly appreciated. (This is my first time posting here so if I am doing something wrong or need to include more information let me know).

Gemfile:

source 'https://rubygems.org'

gem 'rails', '4.2.6'
gem 'jquery-rails'
# Use sqlite3 as the database for Active Record
group :production do
    gem 'pg'
end

group :development, :test do
    gem 'sqlite3'
end

group :assets do    
    gem 'uglifier', '>= 1.3.0'
    gem 'coffee-rails', '~> 4.1.0'
    gem 'bootstrap-sass', '~> 3.3.6'
    gem 'sass-rails', '>= 3.2'
end

Styles.css.scss :

@import "bootstrap";

application.js :

//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require bootstrap
//= require_tree .

3 Answers 3

2

According to the Question its clearly stated that you need to restart your server whenever a gem is installed or updated, if you upgrade ruby, or if you change some logic that runs during boot time (like config/boot.rb or config/database.yml). Otherwise it's generally ok not to, even if you edit/add models/controllers.

Sign up to request clarification or add additional context in comments.

Comments

2

Remove group "assets" from Gemfile. It is obsolete in Rails 4.

Rails 4.0 removed the assets group from Gemfile. You'd need to remove that line from your Gemfile when upgrading.

See Ruby on Rails Guides

Comments

1

you use gem bootstrap-sass than in your application.js use

//= require bootstrap-sprockets

and in your application.css use

// "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
@import "bootstrap-sprockets";
@import "bootstrap";

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.