bundle install doesn't work from capistrano

后端 未结 9 1971
再見小時候
再見小時候 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 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")

提交回复
热议问题