我如何解决 Capistrano 命令错误,上限生产部署?
How can i solve Capistrano command error, cap production deploy?
我在 windows 机器上使用命令行时出现此错误
“(回溯仅限于导入的任务)cap 中止!LoadError:无法加载此类文件 -- capistrano/passenger C:/Sites/Buy/Capfile:23:in `'
(使用 --trace 查看 运行 任务的完整跟踪)"
并且在 git bash 上使用相同的命令出现此错误。
" cap production deploy C:/tools/ruby21/lib/ruby/2.1.0/rubygems.rb:235:in bin_path': can't find gem capistrano ([">= 0.a"]) (Gem::GemNotFoundException)
from C:/RailsInstaller/Ruby2.1.0/bin/cap:22:in
'"
我正在使用的 gems。
gem 'rails', '4.1.8'
gem'sqlite3'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem'therubyracer',平台:ruby
gem 'rails_12factor', 群组: :production
gem 'protected_attributes', '~> 1.1', '>= 1.1.3'
gem 'rake', '~> 10.5'
gem 'rake-compiler', '~> 0.9.5'
gem 'rspec', '~> 3.4'
gem 'omniauth-digitalocean', '~> 0.2.0'
gem 'devise', '~> 3.5', '>= 3.5.6'
gem 'bootstrap-sass'
gem 'autoprefixer-rails', '~> 6.3', '>= 6.3.1'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', 组: :doc
gem 'bcrypt', '~> 3.1.7'
gem 'pg'
gem "cf-autoconfig", "~> 0.2.1"
gem 'omniauth', '~> 1.3', '>= 1.3.1'
gem 'json', '~> 1.8', '>= 1.8.3'
gem 'omniauth-twitter', '~> 1.2', '>= 1.2.1'
gem 'omniauth-facebook', '~> 3.0'
平台:ruby做
gem 'unicorn'
结束
组:开发做
gem 'capistrano', '~> 3.4'
gem 'capistrano-bundler', '~> 1.1', '>= 1.1.4'
gem 'capistrano-rbenv', '~> 2.0', '>= 2.0.4'
gem 'capistrano-rails',组::开发
结束
gem'tzinfo-data',平台:[:mingw, :mswin]
您可能在 Capfile
中包含了一行:
require 'capistrano/passenger'
请删除此行并重试cap production deploy:initial
新的 capistrano 需要 passenger 文件,但我认为你使用的不是 passenger,而是 webrick、puma 或 unicorn。所以这就是你的帽子找不到乘客的原因。
有关使用 capistrano、puma、nginx 将 rails 应用程序部署到数字海洋 ubuntu 服务器的更多信息,完整教程位于:
http://sulmanbaig.com/blog/deploy-on-digitalocean-rails-puma-nginx
我有同样的错误但是:
capistrano/rbenv
我在 Gapfile 中提交了行(在你的例子中是 23)并且部署工作没有问题。
我在 windows 机器上使用命令行时出现此错误 “(回溯仅限于导入的任务)cap 中止!LoadError:无法加载此类文件 -- capistrano/passenger C:/Sites/Buy/Capfile:23:in `' (使用 --trace 查看 运行 任务的完整跟踪)"
并且在 git bash 上使用相同的命令出现此错误。
" cap production deploy C:/tools/ruby21/lib/ruby/2.1.0/rubygems.rb:235:in bin_path': can't find gem capistrano ([">= 0.a"]) (Gem::GemNotFoundException)
from C:/RailsInstaller/Ruby2.1.0/bin/cap:22:in
'"
我正在使用的 gems。
gem 'rails', '4.1.8'
gem'sqlite3'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem'therubyracer',平台:ruby
gem 'rails_12factor', 群组: :production
gem 'protected_attributes', '~> 1.1', '>= 1.1.3'
gem 'rake', '~> 10.5'
gem 'rake-compiler', '~> 0.9.5'
gem 'rspec', '~> 3.4'
gem 'omniauth-digitalocean', '~> 0.2.0'
gem 'devise', '~> 3.5', '>= 3.5.6'
gem 'bootstrap-sass'
gem 'autoprefixer-rails', '~> 6.3', '>= 6.3.1'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', 组: :doc
gem 'bcrypt', '~> 3.1.7'
gem 'pg'
gem "cf-autoconfig", "~> 0.2.1"
gem 'omniauth', '~> 1.3', '>= 1.3.1'
gem 'json', '~> 1.8', '>= 1.8.3'
gem 'omniauth-twitter', '~> 1.2', '>= 1.2.1'
gem 'omniauth-facebook', '~> 3.0'
平台:ruby做
gem 'unicorn'
结束
组:开发做
gem 'capistrano', '~> 3.4'
gem 'capistrano-bundler', '~> 1.1', '>= 1.1.4'
gem 'capistrano-rbenv', '~> 2.0', '>= 2.0.4'
gem 'capistrano-rails',组::开发
结束
gem'tzinfo-data',平台:[:mingw, :mswin]
您可能在 Capfile
中包含了一行:
require 'capistrano/passenger'
请删除此行并重试cap production deploy:initial
新的 capistrano 需要 passenger 文件,但我认为你使用的不是 passenger,而是 webrick、puma 或 unicorn。所以这就是你的帽子找不到乘客的原因。
有关使用 capistrano、puma、nginx 将 rails 应用程序部署到数字海洋 ubuntu 服务器的更多信息,完整教程位于: http://sulmanbaig.com/blog/deploy-on-digitalocean-rails-puma-nginx
我有同样的错误但是:
capistrano/rbenv
我在 Gapfile 中提交了行(在你的例子中是 23)并且部署工作没有问题。