Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different rbenv's behaviour #46

Closed
virvit opened this issue May 31, 2014 · 2 comments
Closed

Different rbenv's behaviour #46

virvit opened this issue May 31, 2014 · 2 comments

Comments

@virvit
Copy link

virvit commented May 31, 2014

Hello.

I've two servers (staging and vagrant). Both are set as a separate environments (config/deploy/staging.rb, config/deploy/vagrant.rb).

On staging I've user's rbenv (/~.rbenv), on vagrant it's system (/opt/rbenv).

deploy.rb:
set :rbenv_ruby, '2.1.2'
set :rbenv_map_bins, %w{rake gem bundle ruby rails}
set :rbenv_roles, :all # default value

staging.rb:
set :rbenv_custom_path, '~/.rbenv'
set :rbenv_type, :user
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"

vagrant.rb
set :rbenv_type, :system # or :system, depends on your rbenv setup
set :rbenv_custom_path, '/opt/rbenv'
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"

Whatever I'm runing (cap staging deploy, cap vagrant deploy) it always tries to use user rbenv and throws error if it's not found:

virvit$ cap vagrant deploy
DEBUG [fe6d5d20] Running /usr/bin/env [ ! -d ~/.rbenv/versions/2.1.2 ] on 192.168.33.10
DEBUG [fe6d5d20] Command: [ ! -d ~/.rbenv/versions/2.1.2 ]
DEBUG [fe6d5d20] Finished in 0.127 seconds with exit status 0 (successful).
ERROR rbenv: 2.1.2 is not installed or not found in ~/.rbenv/versions/2.1.2

Thank you for any advice or help.

@ivanovaleksey
Copy link
Contributor

Hi @virvit,
does the problem still exist?

@will-in-wi
Copy link
Contributor

Since response since April, so closing. Feel free to reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants