0
votes

Gemfile

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

application.html.erb

 <!DOCTYPE html>
 <html>
   <head>
    <title>One Month Rails</title>
    <%= stylesheet_link_tag    "application", :media => "all" %>   #This line is the 1st line error.

application.js

 //= require bootstrap  #added this in.

styles.css.scss

 @import 'bootstrap';
 @import 'bootstrap-responsive';

Showing C:/Temp/demo/code/omrails/app/views/layouts/application.html.erb where line #5 raised:

File to import not found or unreadable: bootstrap. Load paths:

C:/Temp/demo/code/omrails/app/assets/images
C:/Temp/demo/code/omrails/app/assets/javascripts
C:/Temp/demo/code/omrails/app/assets/stylesheets
C:/Temp/demo/code/omrails/vendor/assets/javascripts
C:/Temp/demo/code/omrails/vendor/assets/stylesheets
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/turbolinks-2.3.0/lib/assets/javascripts C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/jquery-rails-3.1.2/vendor/assets/javascripts (in C:/Temp/demo/code/omrails/app/assets/stylesheets/styles.css.scss:1)

I tried restarting rails server as all the other suggestions here posted. Still same problem.

1
What is this import you have on application.css.scss -> @import 'bootstrap-responsive'; ?avcajaraville
@import 'bootstrap-responsive' is actually in a new css file I created called styles.css.scss. All it does is import bootstrap and bootstrap responsivekhoamle
Deleted the group: assets do in the gemfile and also deleted the import bootstrap responsive line. No more error messages.khoamle

1 Answers

3
votes

bootstrap-responsive.css (and related Sass/Less files) was part of Bootstrap v2 and was eliminated in Bootstrap v3 (because responsiveness became baked-in).

You're using Bootstrap v3 (per gem 'bootstrap-sass', '~> 3.2.0'), so you're trying to reference a nonexistent file, hence the error.