Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't deploy rails4 project with capistrano. rbenv: version `2.0.0' is not installed

I am getting error while deploying my rails4 app to VPS. The error I'm getting is

rbenv: version `2.0.0' is not installed

But using "ruby -v" I get

ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]

And in my gemfile I have

source 'https://rubygems.org'

ruby '2.0.0'
gem 'rails', '4.0.0'

This error appears after bundle install recipe

2013-08-04 23:23:56 executing `bundle:install'
* executing "cd /home/yasinishyn/apps/kaiser/releases/20130804202355 && bundle install --gemfile /home/yasinishyn/apps/kaiser/releases/20130804202355/Gemfile --path /home/yasinishyn/apps/kaiser/shared/bundle --deployment --quiet --without development test"
servers: ["xxx.xxx.xxx.xxx"]
[198.211.125.183] executing command
** [out :: xxx.xxx.xxx.xxx] rbenv: version `2.0.0' is not installed
** [out :: xxx.xxx.xxx.xxx] 
command finished in 355ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/yasinishyn/apps/kaiser/releases/20130804202355; true"
servers: ["xxx.xxx.xxx.xxx"]
[xxx.xxx.xxx.xxx] executing command
command finished in 342ms

Please help me to figure out this.

like image 585
Andrey Yasinishyn Avatar asked Aug 04 '13 20:08

Andrey Yasinishyn


1 Answers

Thank you Benjamin, but the error was realy stupid )). Localy I use ruby 2.0.0-p195 which was installed by rvm. On my server I user ruby 2.0.0-p0 which was installed by rbenv, because rbenv don't have ruby package 2.0.0-p195.

So while I was creating new rails4 app by rails-composer, I don't noticed that it was created with .ruby-version file inside of which was a line with ruby version ruby 2.0.0-p195, so I simply * git rm .ruby-version*, and everything is working.

like image 53
Andrey Yasinishyn Avatar answered Nov 11 '22 23:11

Andrey Yasinishyn