bundle install doesn't work from capistrano

后端 未结 9 1699
再見小時候
再見小時候 2021-02-01 15:14

I want to deploy my simple rails 4.0 application via capistrano 3.0.

I use bundler 1.3.5 so I add capistrano-bundler gem to integ

相关标签:
9条回答
  • 2021-02-01 15:57

    Simple solution and working on all Capistrano 3 versions:

    gem 'rvm1-capistrano3', require: false
    

    In Capfile add

    require 'rvm1/capistrano3'
    

    https://github.com/rvm/rvm1-capistrano3

    0 讨论(0)
  • 2021-02-01 16:07
    gem install bundler 
    

    is what I needed to run on my deploy user in order for Capistrano's:

    /usr/local/rvm/bin/rvm 2.4.0 do bundle install --path /var/www/hivebench-api/shared/bundle --without development test --deployment --quiet
    

    to pass!

    0 讨论(0)
  • 2021-02-01 16:09

    In my case, I changed config/deploy.rb's set :log_level, :info to set :log_level, :debug, which showed me "Can not find GEMFILE." This suggested that bundle was running with the wrong working directory, so I changed

    before "deploy:assets:precompile", "deploy:bundle_install"
    desc "Bundle install for RVMs sake"
    task :bundle_install do
      on roles(:app) do
        execute "/u0/jrepenni/.rvm/bin/rvm 2.1.0@akiary do /u0/jrepenni/.rvm/gems/ruby-2.1.0@global/bin/bundle install"
      end
    end
    

    to

    before "deploy:assets:precompile", "deploy:bundle_install"
    desc "Bundle install for RVMs sake"
    task :bundle_install do
      on roles(:app) do
        execute "cd #{release_path} && /u0/jrepenni/.rvm/bin/rvm 2.1.0@akiary do /u0/jrepenni/.rvm/gems/ruby-2.1.0@global/bin/bundle install"
      end
    end
    

    (note the added "cd")

    0 讨论(0)
提交回复
热议问题