gpt4 book ai didi

ruby - Capistrano 部署错误 : Stage not set

转载 作者:数据小太阳 更新时间:2023-10-29 07:19:16 24 4
gpt4 key购买 nike

我关注了this设置 rvm、ruby、rails、nginx 和 passenger 的教程。然后我安装了 capistrano 和 node.js。现在,一切正常,直到我尝试部署 *test_app.*

cap deploy:setup

产生以下错误:

[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
Stage not set, please call something such as `cap production deploy`, where production is a stage you have defined.

现在

cap production deploy

创建此错误:

cap aborted!
RVM - Capistrano integration was extracted to a separate gem, install: `gem install rvm-capistrano` and remove the `$LOAD_PATH.unshift` line, note also the 'set :rvm_type, :user' is now the default (instead of :system).
/home/USER/.rvm/lib/rvm/capistrano.rb:3:in `<top (required)>'
config/deploy.rb:5:in `<top (required)>'
/home/USER/.rvm/gems/ruby-2.0.0-p353/gems/capistrano-3.0.1/lib/capistrano/setup.rb:12:in `load'
/home/USER/.rvm/gems/ruby-2.0.0-p353/gems/capistrano-3.0.1/lib/capistrano/setup.rb:12:in `block (2 levels) in <top (required)>'
/home/USER/.rvm/gems/ruby-2.0.0-p353/gems/capistrano-3.0.1/lib/capistrano/application.rb:12:in `run'
/home/USER/.rvm/gems/ruby-2.0.0-p353/gems/capistrano-3.0.1/bin/cap:3:in `<top (required)>'
/home/USER/.rvm/gems/ruby-2.0.0-p353/bin/cap:23:in `load'
/home/USER/.rvm/gems/ruby-2.0.0-p353/bin/cap:23:in `<main>'
/home/USER/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval'
/home/USER/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => production
(See full trace by running task with --trace)

所以我按照建议做了,安装了 rvm-capistrano 并删除了 *$:.unshift(File.expand_path('./lib', ENV['rvm_path']))*,这造成了以下错误:

cap production deploy
cap aborted!
Unable to activate rvm-capistrano-1.5.1, because capistrano-3.0.1 conflicts with capistrano (~> 2.15.4)
config/deploy.rb:5:in `<top (required)>'
/home/USER/.rvm/gems/ruby-2.0.0-p353/gems/capistrano-3.0.1/lib/capistrano/setup.rb:12:in `load'
/home/USER/.rvm/gems/ruby-2.0.0-p353/gems/capistrano-3.0.1/lib/capistrano/setup.rb:12:in `block (2 levels) in <top (required)>'
/home/USER/.rvm/gems/ruby-2.0.0-p353/gems/capistrano-3.0.1/lib/capistrano/application.rb:12:in `run'
/home/USER/.rvm/gems/ruby-2.0.0-p353/gems/capistrano-3.0.1/bin/cap:3:in `<top (required)>'
/home/USER/.rvm/gems/ruby-2.0.0-p353/bin/cap:23:in `load'
/home/USER/.rvm/gems/ruby-2.0.0-p353/bin/cap:23:in `<main>'
/home/USER/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval'
/home/USER/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => production
(See full trace by running task with --trace)

有什么想法吗?

最佳答案

现在有两个 gem 可以与 capistrano3/rvm1 一起使用:

我已经讨论过合并这两个 gem(在 capistrano/rvm 中使用 rvm1-capistrano3)。

你也可以为rvm开票指出新的gems => https://github.com/wayneeseguin/rvm/issues

关于ruby - Capistrano 部署错误 : Stage not set,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20541862/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com