I'm getting that error on my production server, and can't figure out why. It happens when running this command:
bundle exec rake assets:precompile RAILS_ENV=production
I'm using Rails 3.1.0.rc6
To compile your assets locally, run the assets:precompile task locally on your app. Make sure to use the production environment so that the production version of your assets are generated. A public/assets directory will be created. Inside this directory you'll find a manifest.
This method is responsible for saving assets to disk, and is pretty self-explanatory. Run rake assets:precompile from the command-line from the root of your Rails application. Look at the public/assets directory and you'll see the assets of your Rails application. Our interest at this point is rails.
The clean it removes the old versions of the precompiled assets while leaving the new assets in place. Show activity on this post. rake assets:clean removes compiled assets. It is run by cap deploy:assets:clean to remove compiled assets, generally from a remote server.
This is most likely due your config/application.rb
not requiring rails/all
(the default), but some custom requires.
To resolve this, add the following to config/application.rb
:
require 'sprockets/railtie'
I know this is an old post but I thought it might help someone (probably my future self) if I added this to the answers.
load 'deploy/assets'
require 'sprockets/railtie'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With