Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 在任何源中都找不到capistrano-2.11.0_Ruby On Rails_Deployment_Capistrano - Fatal编程技术网

Ruby on rails 在任何源中都找不到capistrano-2.11.0

Ruby on rails 在任何源中都找不到capistrano-2.11.0,ruby-on-rails,deployment,capistrano,Ruby On Rails,Deployment,Capistrano,我正在尝试使用capistrano来处理Rails 3.2.1应用程序的部署 当我运行cap deploy:update Could not find capistrano-2.11.0 in any of the sources 我在capistrano-2.11.0上遇到了问题,所以我降级到2.9.0 档案: source 'https://rubygems.org' gem 'rails', '3.2.1' # Bundle edge Rails instead: # gem 'ra

我正在尝试使用capistrano来处理Rails 3.2.1应用程序的部署

当我运行
cap deploy:update

Could not find capistrano-2.11.0 in any of the sources
我在capistrano-2.11.0上遇到了问题,所以我降级到2.9.0

档案:

source 'https://rubygems.org'

gem 'rails', '3.2.1'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'
gem 'capistrano', '2.9.0'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer'

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'
bundle show capistrano

 /Users/Tyler/.rvm/gems/ruby-1.9.2-p290/gems/capistrano-2.9.0
为什么要寻找capistrano-2.11.0

Capfile:

load 'deploy' if respond_to?(:namespace) # cap2 differentiator
#require 'deploy'
# Uncomment if you are using Rails' asset pipeline
 load 'deploy/assets'
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default tasks
config/deploy.rb

require 'bundler/capistrano'
set :application, "CapistranoApp"
set :repository,  "ssh://ubuntu@ror.weaponxo.com/home/ubuntu/projectdir.git"
set :applicationdir, "/var/www/#{application}"
set :domain, "ror.weaponxo.com"
set :use_sudo, false
set :user, "ubuntu"
#set :default_environment, {'PATH' => "/home/ubuntu/.rvm/rubies/ruby-1.9.2-p290/bin/:$PATH"}

 set :scm, :git
 set :branch, "master"
 set :git_shallow_clone, 1
 set :scm_verbose, true
 # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`

 role :web, domain                          # Your HTTP server, Apache/etc
 role :app, domain                          # This may be the same as your `Web` server
 role :db,  domain, :primary => true # This is where Rails migrations will run

 set :deploy_to, applicationdir
 set :deploy_via, :remote_cache

 $:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path.
 require "rvm/capistrano"                  # Load RVM's capistrano plugin.
 set :rvm_ruby_string, 'ruby-1.9.2-p290'        # Or whatever env you want it to run in.
 set :rvm_type, :user  # Copy the exact line. I really mean :user here

# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts

# 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
 end
最初我确实运行了
gem安装capistrano
,那么该版本(2.11.0)是否隐藏在某个地方

谢谢

编辑 注意,capistrano-2.9.0是唯一安装的版本,我以前运行过
bundle卸载capistrano
并删除了2.11.0

我运行了
bundle exec cap deploy:update
,但仍然得到相同的错误

编辑2 我已将我的Gemfile.lock文件重新提交给repo。它的读数为capistrano 2.9.0

编辑3
运行
cap-deploy:cold
工作。

您可以使用
bundle-exec-cap-deploy
,它将使用Gemfile中指定的capistrano版本

您可以使用
bundle-exec-cap-deploy

卸载capistrano 2.11.0或始终使用
bundle exec
在运行特定于gem的命令时使用gem文件中指定的版本


bundle exec cap deploy:update

卸载capistrano 2.11.0或在运行gem特定命令时始终使用
bundle exec
,以便它使用gem文件中指定的版本

Could not find capistrano-2.11.0 in any of the sources

bundle exec cap deploy:update

Capistrano 2.11.0被从gems中删除。新版本是2.11.1

Could not find capistrano-2.11.0 in any of the sources
编辑
2.11.1也被猛拉。目前在2.11.2上,Capistrano 2.11.0被从宝石中拔出。新版本是2.11.1

编辑
2.11.1也被猛拉。目前在2.11.2上

您的
Gemfile.lock中有哪个版本的capistrano?@James-这可能是一个问题。我没有重新提交这些更改。此后,我将Gemfile和Gemfile.lock(均为capistrano 2.9.0)提交给回购协议。与您的
Gemfile.lock
?@James中的capistrano版本相同的结果-这可能是一个问题。我没有重新提交这些更改。此后,我将Gemfile和Gemfile.lock(均为capistrano 2.9.0)提交给回购协议。同样的结果这似乎是一个相当普遍的现象,因为2.13.3也被拉了出来。现在我们到了2.15.4。有关版本信息,请参阅。这似乎是一个相当常见的问题,因为2.13.3也被拉了出来。现在我们升级到了2.15.4。有关版本信息,请参阅。