rvm1-capistrano3错误没找到红宝石

时间:2014-08-29 07:49:37

标签: ruby ruby-on-rails-4 gem rvm capistrano3

我正在使用部署脚本来解决问题。它没有跟随输出 -

  

DEBUG [3852918b]命令:cd
  /var/www/billing.staging/releases/20140829073745&&
  /tmp/billing-deploy/rvm-auto.sh 2.1.2 gem install --file Gemfile
  DEBUG [3852918b]未安装ruby-2.1.2。 DEBUG [3852918b] Ruby
  没有安装ruby-2.1.2。 DEBUG [3852918b]无法找到红宝石   '2.1.2'。帽子流产! SSHKit :: Runner :: ExecuteError:异常,而
  在主机5.9.119.212上执行:gem退出状态:103 gem stdout:
  没有写任何宝石stderr:没有安装ruby-2.1.2。红宝石
  没有安装ruby-2.1.2。找不到'2.1.2'的红宝石。

我的剧本:

# config valid only for Capistrano 3.1
lock '3.1.0'

set :application, 'billing'
set :repo_url, 'git@github.com:aviacentr/Billing.git'
set :keep_releases, 5

set :linked_files, %w{config/database.yml config/secrets.yml config/billing.yml}
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
# Default branch is :master
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }

# Default deploy_to directory is /var/www/my_app
# set :deploy_to, '/var/www/my_app'
set :bundle_servers, -> { release_roles(fetch(:bundle_roles)) } # this is default
set :bundle_binstubs, -> { shared_path.join('bin') }     # this is default
set :bundle_gemfile, -> { release_path.join('Gemfile') } # default: nil
set :bundle_path, -> { shared_path.join('bundle') }      # this is default
set :bundle_without, %w{development test}.join(' ')      # this is default
set :bundle_flags, '--deployment --quiet '                # this
# is default
set :bundle_env_variables, {}
set :rvm1_ruby_version, "2.1.2"
# this is default
# Default value for :scm is :git
# set :scm, :git

# Default value for :format is :pretty
set :format, :pretty

# Default value for :log_level is :debug
# set :log_level, :debug

# Default value for :pty is false
# set :pty, true

# Default value for :linked_files is []
# set :linked_files, %w{config/database.yml}

# Default value for linked_dirs is []
# set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }

# require 'mongodb_logger/capistrano'
# set :mongodb_logger_assets_dir, "public/assets" # where to put mongodb assets
# after 'deploy:update_code', 'mongodb_logger:precompile'

# Default value for keep_releases is 5
set :keep_releases, 3

set :branch, ENV['branch'] || 'master' # e.g. cap staging deploy branch=dev

namespace :deploy do

  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      # Your restart mechanism here, for example:
      # execute :touch, release_path.join('tmp/restart.txt')
    end
  end

  after :publishing, :restart

  after :restart, :clear_cache do
    on roles(:web), in: :groups, limit: 3, wait: 10 do
      # Here we can do anything such as:
      # within release_path do
      #   execute :rake, 'cache:clear'
      # end
    end
  end

end

after 'deploy:publishing', 'deploy:restart'
namespace :deploy do
  task :restart do
    invoke 'unicorn:restart'
  end
end

before 'deploy', 'rvm1:install:rvm'
before 'deploy', 'rvm1:install:ruby'  # install/update Ruby
before 'deploy', 'rvm1:install:gems'
before 'deploy', 'rvm1:hook'

# after 'deploy:publishing', 'binstubs'
# task :binstubs do
#   run 'gem regenerate_binstubs'
# end

你能帮我解决这个问题吗?

0 个答案:

没有答案