Skip to content


Subversion checkout URL

You can clone with
Download ZIP


New rails 3.1 assets support broken #81

gucki opened this Issue · 12 comments

4 participants


Refering to: #35 and

When the Gemfile has been updated the rake task to precompile the assets will fail because bundle:install has not been run yet. I suggest to change after 'deploy:update_code', 'deploy:assets:precompile' to before "deploy:symlink", "deploy:assets:precompile".


There's an easy workaround for now, just add before "deploy:assets:precompile", "bundle:install" to your deploy.rb


@cgriego ping


@gucki Can yo share your Capfile, deploy.rb (obfuscating anything sensitive), and Bundler version?


@cgriego I could post my configuration files, but they are pretty much standart. bundler is at 1.0.15. Looking at the sources I mentioned you can easily see why bundle:install is called after deploy:assets:precompile.

In bundler capistrano recipe: after "deploy:finalize_update", "bundle:install"
In capistrano assets: before 'deploy:finalize_update', 'deploy:assets:symlink'

If you still need my configs, please let me know and I'll post them asap.


@gucki I need to see them. Specifically how you're loading the deploy, deploy/assets, and bundler recipes.


@cgriego: Ok, here they are :)



I'm sorry I haven't responded back. Past couple of days got away from me, and then the issue turned out to be more subtle than I expected. Just wanted to let you know I haven't forgotten you.


@cgriego Thanks for keeping me updated, very nice :)


Bundle install isn't the only issue. I have a custom task I was running after deploy:update_code to write my production database.yml files. If this doesn't go before the asset precompile, I get a failure because rake isn't loading right. There are other post-code-update things people might want to do as well that may affect how it runs. I ended up moving it to before deploy:finalize_update, but it feels wrong and brittle to have to jigger things around like that.

Would before deploy:symlink be so bad? I can't think of anything else that would depend on this update except for the running app, so it seems like a good place to make it happen without being affected by anything else.


@cgriego Any news? :) What are the problems you are facing?


Okay, there are two options here.

  1. Upgrade Bundler to 1.0.18 on the deploying machine. It includes a change to the Capistrano hook.
  2. Move the require 'bundler/capistrano' line from the deploy.rb file to the Capfile between loading the deploy and deploy/assets files.

Seems to be working fine for me now using bundler 1.0.18, so I'm closing this issue. Thanks!

@gucki gucki closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.