Reputation: 4551
I had my little rails-app (based on refinerycms) well up and running when I suddenly realized it had a small bug. Fixed it, tested ok, commit, push, deploy, the regular routine. However this time my deployment (which had worked countless times before) crashed on me during assets:precompile
with
* 2012-12-21 11:44:59 executing `deploy:assets:precompile'
* executing "cd /home/somename/releases/20121221104442 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
servers: ["ssh.alwaysdata.com"]
[ssh.alwaysdata.com] executing command
*** [err :: ssh.alwaysdata.com] rake aborted!
*** [err :: ssh.alwaysdata.com] Invalid argument - /nfs/http9/somename/app/ttvz/releases/20121221104442/tmp/cache/assets/D17/790/sprockets%2F159b50b9f479a8cb2519ea6a40f09f92
*** [err :: ssh.alwaysdata.com] /home/somename/app/ttvz/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/core_ext/file/atomic.rb:38:in `chown'
...
and of course a whole bunch of a Stacktrace. I tried to find something on the web but failed miserably. The same thing also happened when I tried to precompile the assets of the current
version of the app (which worked like a charm in development).
This seems to be different from the other precompile
-troubles on StackOverflow.
Upvotes: 1
Views: 575
Reputation: 4551
Contrary to public belief this turned out not to be my error. I started looking up the source of atomic.rb
and figured that the call to chown
would actually end up doing exactly nothing. So I patched it away not without leaving a message in the alwaysdata user forum. With my (ugly) little patch deployments worked as before again.
A few hours later a friendly staff member told me that this lead him to suspect a recent kernel upgrade gone awry. He fixed it the same evening and everything is working again (without my patch).
Upvotes: 2
Reputation: 8034
It is written in the tutorial of your host (http://wiki.alwaysdata.com/wiki/Deploying_a_Rails_3_application) that you have to deploy your app in development environment. In this environment, the assets are not precompiled so you don't have the same problem.
I recommend to switch hosts for heroku or amazon, where you can run your app in production env!
Upvotes: 0