rails 3.1 assets are not available
I started playing around with rails 3.1.rc4 but the first problem I'm having is that the assets are not available. I cre开发者_如何学JAVAated a brand new project and in the index page the rails image gives 404. Actually any assets are available.
I checked
# application.rb
# Enable the asset pipeline
config.assets.enabled = true
And I tried
config.assets.paths << "#{Rails.root}/app/assets/images"
and also from the shell
$ rake rails:update
$ rake assets:clean
$ rake assets:precompile
had no luck, so I destroyed the gemset and I made another one reinstalling rails, but nothing worked so far.
Any ideas? - thank you
I had the same problem and resolved it by forcing Rails to use sprockets beta10 instead of beta12 in the Gemfile:
gem 'sprockets', '2.0.0.beta.10'
And then running
bundle update sprockets
Another fix might be to install Rails 3.1.0rc5. The problem seems to be incompatibility between Rails and Sprockets and is detailed here. I guess this problem will be resolved when the final version of Rails 3.1 arrives.
精彩评论