[英]How can i solve Capistrano command error, cap production deploy?
我在Windows机器上使用命令行时遇到此错误,“(返回跟踪仅限于导入的任务)帽被终止!LoadError:无法加载此类文件-capistrano / passenger C:/ Sites / Buy / Capfile:23:in`' (通过使用--trace运行任务来查看完整的跟踪)”
并且在git bash上使用相同的命令我有此错误。 “上限生产部署C:/tools/ruby21/lib/ruby/2.1.0/rubygems.rb:235: bin_path': can't find gem capistrano ([">= 0.a"]) (Gem::GemNotFoundException) from C:/RailsInstaller/Ruby2.1.0/bin/cap:22:in
'“
我正在使用的宝石。
gem'rails','4.1.8'
gem'sqlite3'
gem'sass-rails','〜> 4.0.3'
gem'uglifier','> = 1.3.0'
宝石'coffee-rails','〜> 4.0.0'
gem'therubyracer',平台:: ruby
宝石'rails_12factor',组::生产
gem'protected_attributes','〜> 1.1','> = 1.1.3'
宝石'rake','〜> 10.5'
gem'rake-compiler','〜> 0.9.5'
gem'rspec','〜> 3.4'
gem'omniauth-digitalocean','〜> 0.2.0'
宝石'devise','〜> 3.5','> = 3.5.6'
宝石'bootstrap-sass'
gem'autoprefixer-rails','〜> 6.3','> = 6.3.1'
宝石'jquery-rails'
宝石“ turbolinks”
宝石'jbuilder','〜> 2.0'
gem'sdoc','〜> 0.4.0',组::doc
gem'bcrypt','〜> 3.1.7'
宝石'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'
平台:红宝石做
宝石“独角兽”
结束
小组:发展吗
宝石'capistrano','〜> 3.4'
宝石'capistrano-bundler','〜> 1.1','> = 1.1.4'
宝石'capistrano-rbenv','〜> 2.0','> = 2.0.4'
宝石'capistrano-rails',类别::开发
结束
gem'tzinfo-data',平台:[:mingw,:mswin]
您可能在Capfile
中包含了以下一行:
require 'capistrano/passenger'
请删除此行,然后重试cap production deploy:initial
新的capistrano需要旅客文件,但我认为您不是在使用旅客,而是使用webrick,puma或unicorn。 因此,这就是您的便帽找不到乘客的原因。
有关使用capistrano,puma,nginx将Rails应用程序部署到数字海洋ubuntu服务器的更多信息,请参见以下网址的完整教程: http : //sulmanbaig.com/blog/deploy-on-digitalocean-rails-puma-nginx
我有同样的错误,但:
capistrano/rbenv
我在Gapfile中提交了该行(在您的情况下为23),并且部署工作没有问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.