Rails 3 — Bundler/Capistrano Errors

前端 未结 8 1621
攒了一身酷
攒了一身酷 2020-12-07 13:39

I have a basic Rails 3 app working locally on my development box, but want to test out deploying early on to make sure everything works. I\'m using Capistrano to deploy.

8条回答
  •  情话喂你
    2020-12-07 14:00

    I tried a number of the suggestions. Had problems with setting the paths in the deploy.rb file for the RVM environment. My final solution was to include the following:

    In the config/deploy.rb file add:

    require "bundler/capistrano"
    

    Also in config/deploy.rb, or in my case config/production.rb as I was using the multistage option for Capistrano

    after "deploy", "rvm:trust_rvmrc"
    

    This step simply ensures that we stop getting the 'do you want to trust the .rvmrc file' and it calls a task in the deploy.rb file such as:

    namespace :rvm do
       task :trust_rvmrc do
          run "rvm rvmrc trust #{release_path}"
       end
    end
    

    After putting in these slight changes I was able to run cap production deploy which checked out the code; executed the asset pipeline deployment, linked up the release folder to current, executed bundle install and cleaned up.

提交回复
热议问题