1

I am trying to deploy a simple demo app via cap. When I run cap deploy:migrations rake seems to fail with:

** [out :: -----.com] Could not find highline-1.6.9 in any of the sources
** [out :: -----.com] Try running 'bundle install'.

My production machine (Dreamhost) has highline (1.6.9, 1.6.2) and my dev machine highline (1.6.9). I have been going though and downgrading each o these on my dev machine etc. only to have it throw a new one at me each time.

I must be missing something obvious here.

Dan

Dan Tappin
  • 2,692
  • 3
  • 37
  • 77
  • Did you try running 'bundle install'? – sosborn Jan 17 '12 at 07:51
  • mybe highline is in development group of your Gemfile . put it outside of any group in Gemfile then run bundle (or cap deploy) – andrea Jan 17 '12 at 08:45
  • Hope this helps :) http://stackoverflow.com/questions/4672889/deploying-rails-3-on-dreamhost-with-capistrano – Prair Jan 17 '12 at 13:04
  • sosborn: yup. andrea: I don't understand what you are trying to suggest. Prair: will give that tip a shot tonight when I get home to my dev machine. – Dan Tappin Jan 18 '12 at 01:38

2 Answers2

0

Even if the gem is available on the machine, if it is not specified in your Gemfile, it will not be available to your app. In addition, in production, bundle install looks at the Gemfile.lock to recreate the gems from your development setup. Thus, make sure that:

  1. You have specified highline in your Gemfile
  2. You have run bundle install on your development machine (updates Gemfile.lock)
  3. You've pushed these latest changes to your git(hub) repo

You could try to run cap deploy (without migrations) and then cap deploy:migrate (just the migrations) to make sure that your bundle is installed correctly to be sure.

If this suggestion doesn't solve your problem, could you post the result of cap deploy:check and any other errors or warnings that were returned while deploying. (especially related to bundler)?

HectorMalot
  • 1,120
  • 1
  • 6
  • 13
  • cap deploy works. Adding :migrate fails. My biggest frustration is that I have the new versions of the gems on my production system (Dreamhost). New ones are in my path etc. but when take run it can only seem to see the stock (outdated) ones DH has. – Dan Tappin Jan 18 '12 at 01:33
  • I am having to add the old DH versions to my Gemfile to force rails to use the older versions because it can't seem to find the new ones. Gem list shows them correctly. – Dan Tappin Jan 18 '12 at 01:40
0

Here is what I settled on:

Rails 3 -- Bundler/Capistrano Errors

in my config/deploy.rb files I added:

set :bundle_cmd, "/home/#{user}/.gems/bin/bundle"

I guess Capistrano does not load the default path.

Community
  • 1
  • 1
Dan Tappin
  • 2,692
  • 3
  • 37
  • 77