Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capistrano deploy error: Stage not set

I followed this tutorial to set up rvm, ruby, rails, nginx and passenger. I then installed capistrano and node.js. Now, everything works fine up to the point where I try to deploy *test_app.*

cap deploy:setup

creates the following error:

[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.

now

cap production deploy

creates this error:

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)

So I did what was suggested, installed rvm-capistrano and removed *$:.unshift(File.expand_path('./lib', ENV['rvm_path']))*, which created the following error:

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)

Any ideas?

like image 947
user3094719 Avatar asked Nov 10 '22 16:11

user3094719


1 Answers

right now there are two gems that work with capistrano3 / rvm1:

  • https://github.com/capistrano/rvm
  • https://github.com/rvm/rvm1-capistrano3 (I'm author of this one)

I have already discussed merging both gems (use rvm1-capistrano3 in capistrano/rvm).

You can also open a ticket for rvm to point out to the new gems => https://github.com/wayneeseguin/rvm/issues

like image 102
mpapis Avatar answered Nov 15 '22 05:11

mpapis