【问题标题】:capistrano deployment no such file or directorycapistrano 部署没有这样的文件或目录
【发布时间】:2013-10-18 17:01:20
【问题描述】:

这是我的 deploy.rb 文件

require "bundler/capistrano"

set :rvm_ruby_string, "ruby-2.0.0-p247"
set :rvm_type, :user

set :application, "myproject"
set :repository,  "git@bitbucket.org:user/project.git"
set :user, "server-login-name"
set :branch, "master"
set :stages, %w{staging production}
require 'capistrano/ext/multistage'

set :deploy_via, :copy
set :use_sudo, true
set :rvm_install_with_sudo, true

default_run_options[:pty] = true

set :port, 2021

set :scm, :git

role :web, "mydomain.com"
role :app, "mydomain.com"
role :db,  "mydomain.com", :primary => true
role :db,  "mydomain.com"

after "deploy:update_code","deploy:config_symlink"

set :rvm_type, :system

# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
  task :start do ; end
  task :stop do ; end
  task :restart, :roles => :app, :except => { :no_release => true } do
    #run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
  end

  task :config_symlink do
    #run "cp #{release_path}/config/database.yml.example #{release_path}/config/database.yml"
  end
end

before 'deploy', 'rvm:install_ruby'
before 'deploy', 'rvm:create_gemset'

我的 staging.rb 和 production.rb 在单独的文件中有以下内容

set :deploy_to, "/var/rails_apps/project_stage"
set :deploy_to, "/var/rails_apps/project"

现在我面临两个错误

1. triggering before callbacks for `deploy'
the task `rvm:install_ruby' does not exist

如果我评论 rvm:install_rubyrvm:create_gemset

2. cannot open: no such file or directory for all my file and folders

我找不到发生这种情况的原因。谁能帮忙

【问题讨论】:

    标签: ruby-on-rails-4 capistrano


    【解决方案1】:

    RVM:install_ruby 不是 capistrano-RVM 中的东西?

    【讨论】:

    • 我找不到你。什么意思?
    • 您在 1. 问题中提到的任务根本不存在。它们不是您正在使用的 gem 的功能。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多