Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

New rails 3.1 assets support broken #81

Closed
gucki opened this Issue · 12 comments

4 participants

@gucki

Refering to: #35 and https://github.com/carlhuda/bundler/blob/1-0-stable/lib/bundler/capistrano.rb

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".

@gucki

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

@leehambley
Owner

@cgriego ping

@cgriego

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

@gucki

@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.

@cgriego

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

@gucki

@cgriego: Ok, here they are :)

deploy.rb: http://pastie.org/2375072
Capfile: http://pastie.org/2375074

@cgriego

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.

@gucki

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

@jdcrutchley

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.

@gucki

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

@cgriego

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.
@gucki

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.