2

I've added the following to Gemfile:

gem 'bootstrap-sass'

I added this to assets/stylesheets/application.css.scss (renamed to .scss):

 @import "bootstrap-sprockets";
 @import "bootstrap";

I then ran bundle install.

I've added this controller: rails g controller firstpage index. When I visit localhost:3000/firstpage/index, I get this error:

Showing /Users/myuser/Projects/test5/app/views/layouts/application.html.erb where line #5 raised:

File to import not found or unreadable: bootstrap-sprockets.

@import "bootstrap-sprockets";
@import "bootstrap";

Anyone know what I did wrong?

1

2 Answers 2

2

Make sure you restart your server when you bundle install. Also, remove *= require_self and *= require_tree . when using imports.

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

Comments

0

Have you restarted the server? CTRL + C and then rails s again.

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.