-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
assets:precompile - File to import not found or unreadable #23
Comments
Same error. Is it needed to do something special? Just run 'rails server' and I got this: File to import not found or unreadable: html5-boilerplate.
Load path: Sass::Rails::Importer([MY_PROJECT]...app/assets/stylesheets/style.scss)
(in [MY_PROJECT].../app/assets/stylesheets/style.scss) |
Same error here, can't import compass or susy. Works fine in development. Using latest sass-rails commit on 3-1-stable (which fixed some rails 3.1.1rc1 issues). |
Just echoing this problem. Anyone find a solution yet? |
i got it working know but don't know why yet :-), keep you posted |
kieran: |
maybe thats it yeah :-D, and i switched from the rails 3-1 stable branch on github to the gem again |
I just started running into this problem too. However, it only happens when I run |
Does this work locally: What I do now is running the asset precomile locally, checking the generated files out in git and pushing it to heroku. This way where is no need for server side assets:precompile. Check this out if you haven't already: http://devcenter.heroku.com/articles/rails31_heroku_cedar#the_asset_pipeline |
If you're having trouble when switching from development to production mode, try explicitly setting your sass load_paths: application.rb
application.rb (down a few lines)
(change the last line accordingly - I was having issues doing @import "compass/etc") I don't know what was causing it to break, but doing this worked for me. Details:
If this solved your problem, let us know! |
@anthonylebrun So it turns out that downgrading my version of compass by a point release fixed the problem. Thanks for the help though! |
@kieranklaassen That hadn't been working locally, no. I'm also not using Heroku. By locking compass at revision |
I fixed the problem by commenting out |
seems like I still run into this problem regardless of config.assets.initialize_on_precompile |
@anthonylebrun Your comment fixed it for me. Thanks! |
@jpadvo great! This one gave me a headache so I'm glad to it was useful to someone else! |
@anthonylebrun your fix also worked here. now we just need to make it work out of the box. |
@anthonylebrun your fix also worked for me. But I had to add an additional path for html5-boilerplate: config.sass.load_paths << "#{Gem.loaded_specs['html5-boilerplate'].full_gem_path}/stylesheets" Thanks! |
@anthonylebrun It worked. This was so useful. Once again I have no idea why this works. Asset pipeline is so whiny and buggy sometimes. Thanks for the help! |
@anthonylebrun +1, your hacks worked for me. Thanks! All I need was the following line in environment.rb: |
@anthonylebrun - Thanks for solution. It worked. Definitely would like other solution which doesn't require explicitly setting of sass load_paths |
@anthonylebrun : thanks !!! |
@Berlimioz 2 years later and this fix is still helping people. If only this was a stackoverflow answer ;) |
For rails 4 I created a sass.rb initializer with this line of code:
|
Another year later... we are still running into this issue |
I keep getting this error while precompiling the assets in my Rails 3.1.0 app on deployment to my Heroku server.
Running: rake assets:precompile rake aborted! File to import not found or unreadable: html5-boilerplate. Load path: Sass::Rails::Importer(/tmp/build_1uvdudt9q799d/app/assets/stylesheets/application.css.scss) (in /tmp/build_1uvdudt9q799d/app/assets/stylesheets/application.css.scss)
config/compass.rb
app/assets/stylesheets/application.css.scss
Gemfile
The text was updated successfully, but these errors were encountered: