ruby on rails - Bundler not installing gems properly during deploy (RVM issue I think) -


i've got app running on box, , i'm trying add box.

they both use rvm.

the problem deploy process fails new app i've added box.

when deploying, call

rvm info  

to see ruby i'm using. here's output:

ruby-1.9.3-p392:    system:     uname:       "linux li83-41 2.6.39.1-linode34 #1 smp tue jun 21 10:29:24 edt 2011 i686 gnu/linux"     system:      "ubuntu/10.04/i386"     bash:        "/bin/bash => gnu bash, version 4.1.5(1)-release (i486-pc-linux-gnu)"     zsh:         " => not installed"    rvm:     version:      "rvm 1.22.3 (master) wayne e. seguin <wayneeseguin@gmail.com>, michal papis <mpapis@gmail.com> [https://rvm.io/]"     updated:      "4 days 21 hours 14 minutes 38 seconds ago"     path:         "/usr/local/rvm"    ruby:     interpreter:  "ruby"     version:      "1.9.3p392"     date:         "2013-02-22"     platform:     "i686-linux"     patchlevel:   "2013-02-22 revision 39386"     full_version: "ruby 1.9.3p392 (2013-02-22 revision 39386) [i686-linux]"    homes:     gem:          "/usr/local/rvm/gems/ruby-1.9.3-p392"     ruby:         "/usr/local/rvm/rubies/ruby-1.9.3-p392"    binaries:     ruby:         "/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby"     irb:          "/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/irb"     gem:          "/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/gem"     rake:         "/usr/local/rvm/gems/ruby-1.9.3-p392/bin/rake"    environment:     path:         "/usr/local/rvm/gems/ruby-1.9.3-p392/bin:/usr/local/rvm/gems/ruby-1.9.3-p392@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p392/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"     gem_home:     "/usr/local/rvm/gems/ruby-1.9.3-p392"     gem_path:     "/usr/local/rvm/gems/ruby-1.9.3-p392:/usr/local/rvm/gems/ruby-1.9.3-p392@global"     my_ruby_home: "/usr/local/rvm/rubies/ruby-1.9.3-p392"     irbrc:        "/usr/local/rvm/rubies/ruby-1.9.3-p392/.irbrc"     rubyopt:      ""     gemset:       "" 

i'm using bundler, fails during deploy:

cd #{current_path} && bundle install --deployment 

throwing error:

fetching gem metadata https://rubygems.org/......... fetching gem metadata https://rubygems.org/.. installing rake (10.1.0) installing i18n (0.6.5) installing minitest (4.7.5) installing multi_json (1.7.9) installing atomic (1.1.13) installing thread_safe (0.1.2) installing tzinfo (0.3.37) installing activesupport (4.0.0) gem::installerror: activesupport requires ruby version >= 1.9.3. error occurred while installing activesupport (4.0.0), , bundler cannot continue. make sure `gem install activesupport -v '4.0.0'` succeeds before bundling. rake aborted! 

i'm @ wits end here: looks i'm using ruby1.9.3-p392 bundler telling me need ruby >= 1.9.3.

here's .bundle/config:

--- bundle_path: vendor/bundle bundle_disable_shared_gems: '1' bundle_frozen: '1' 

also, if ssh box looks i'm using correct ruby:

$ ruby /usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby 

and running bundle install works fine.

any ideas?

edit #1

i'm using vlad, here's deploy.rb:

set :repository,  repo_location set :revisions,   5 set :revision, "head" set :domain, domain set :user,        login_user set :deploy_to,   deploy_dir set :deploy_env, "production"  namespace :vlad    desc 'restart passenger'   remote_task :restart_app     puts "restarting passenger..."     run "touch #{current_release}/tmp/restart.txt"   end    desc 'runs our full deployment'     task :deploy => ['vlad:update',                       'vlad:symlink',                       'vlad:rvm_info',                      'vlad:update_bundle',                      'vlad:migrate_database',                      'vlad:cleanup',                       'vlad:restart_app']    desc 'symlinks custom directories'   remote_task :symlink     run "ln -s #{shared_path}/environments #{latest_release}/config/environments"     run "ln -s #{shared_path}/database.yml #{current_path}/config/database.yml"     run "ln -s #{shared_path}/config.yml #{current_path}/config/config.yml"   end    desc 'show rvm info debug purposes'   remote_task :rvm_info     run "cd #{current_path} && rvm info"    end    desc 'update bundler bundle use include new gems in gemfile'   remote_task :update_bundle     run "cd #{current_path} && bundle install --deployment"    end    # copied vlad source, integrate migrate not work it's missing   # && between cd , db migrate task itself. bug tracked   # @ http://rubyforge.org/tracker/?group_id=4213&atid=16258&func=detail&aid=28445,    # not anything.   remote_task :migrate, :roles => :app     break unless target_host == rake::remotetask.hosts_for(:app).first      directory = case migrate_target.to_sym                 when :current current_path                 when :latest  latest_release                 else raise(argumenterror, "unknown migration target #{migrate_target.inspect}")                 end      run(["cd #{directory}",           "bundle exec #{rake_cmd} db:migrate #{migrate_args} rails_env=#{rails_env}"].join(" && "))   end  end 

it not rvm fault ... issue how running commands, vlad not use login session done ssh need load rvm manually:

set :command_prefix, [". `/usr/local/rvm/bin/rvm . rvm env --path`"] 

i have no way of testing - based on vlad code - should start.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -