I am currently troubleshooting an issue with precompiling of asset pipeline and pushing it on the server. I am on rails 4.2.3 and ruby 2.2.0!
I precompile my assets with
RAILS_ENV=production bundle exec rake assets:precompile
and several files are created successfully, including the .sprockets-manifest-... file.
If i now try to push the app, it looks like the manifest file is not detected - my usual "assets cannot be compiled" issue (the reason why i am precompiling) occurs:
Preparing app for Rails asset pipeline Running: rake assets:precompile rake aborted! Mysql2::Error: Can't connect to MySQL server on '127.0.0.1' (111)
I am pretty sure this worked before but somehow - maybe by upgrading to rails 4.2.3, it fails now...
I appreciate any kind of help!
The usage of the sprockets gem with a version < 3.x fixes this issue for me.
With the new version (> 3.x), the name of the manifest file has changed to .sprockets-manifest-xxxx.json
! Due to this the precompiled assets aren't recognized correctly. With the old version the old name .manifest-xxxx.json
is used and the precompiled assets are recognized.