rm -rf tmp/*
rm -rf public/assets/*
Then that seems to fix it.
If I run (on the server)
bundle exec rake assets:precompile
then I get an error because one of the .js.erb files uses records from the database and it's trying to connect to dev, so if I then run:
RAILS_ENV=production bundle exec rake assets:precompile
Then that works but errors out when it gets to the bootstrap/_alerts.scss from the bootstrap gem which I don't even need and have uninstalled locally (I am using bootstrap and jQuery but I don't use the actual gems, I prefer handling them manually in the application.js/.css. Not sure why this gem exists on production when I've removed it locally and committed.
The question is, what's the proper way to precompile assets for production during a deploy?
As far as I understand it, the capistrano-bundler gem (1.1.4 installed locally) should take care of this automatically but maybe there's something I'm missing or gotten confused about
I am just looking for the proper configuration.
In my environments/production.rb I have
config.serve_static_files = true
config.assets.compress = true
config.assets.initialize_on_precompile = true
config.assets.compile = true
config.assets.digest = true
---
BUNDLE_FROZEN: '1'
BUNDLE_PATH: "/var/www/rails.4playtheband.co.uk/shared/bundle"
BUNDLE_WITHOUT: development:test
BUNDLE_DISABLE_SHARED_GEMS: '1'
If other information is needed then I can provide it but even just an example of someone else's config would be a great help.
Martin
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/f8153aca-b41c-415d-85c8-49f5b6e781e1%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.