Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installed bins are not refreshed. #22

Closed
coffeeaddict opened this issue Dec 11, 2013 · 3 comments
Closed

Installed bins are not refreshed. #22

coffeeaddict opened this issue Dec 11, 2013 · 3 comments

Comments

@coffeeaddict
Copy link

The bins that are places in shared/bin are not refreshed per-deploy.

As we, at our site, only keep 5 previous releases this means that after the fifth consecutive release the specified Gemfile is gone, when using the supplied defaults.

This is what my unicorn_rails file looks like:

#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'unicorn_rails' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../../releases/20131211121115/Gemfile",
  Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('unicorn', 'unicorn_rails')

The 20131211121115 directory has been (long) reaped by Capistrano in order to keep things clean.

I see 3 solutions:

  • Rewrite files in shared/bin to point to ../../../current/Gemfile (rewriting files is a bad idea)
  • Remove the (appropriate) files in shared/bin before each bundle:install (removing all files might have unwanted side effects, so you need some sort of manifest)
  • Pack the files in release_path.join('bin') by default

Is there any speaking against the last option?

@Kriechi
Copy link
Contributor

Kriechi commented Dec 11, 2013

What do you mean by "The bins that are places in shared/bin are not refreshed per-deploy."?
I just checked in one of my projects, and the bins are updated. So each file in bin/ is touched at the last deploy date+time (as listed in revisions.log). And the content in each bin-file mentions the correct Gemfile-path.

@tsechingho
Copy link

@coffeeaddict The gemfile path of each bins in shared/bin will change it's value while the bundle --gemfile --binstubs is executed each time.

@coffeeaddict
Copy link
Author

I am not sure what has been happening there, but it seems resolved now... May have something to do with dying-off deployments due to reconfiguration. I'm closing (and forgetting) this.

Thnx anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants