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

Does Homebrew installed rbenv supported? #52

Open
mech opened this issue Nov 4, 2014 · 3 comments
Open

Does Homebrew installed rbenv supported? #52

mech opened this issue Nov 4, 2014 · 3 comments

Comments

@mech
Copy link

mech commented Nov 4, 2014

I am using Mac OS X as server and not Linux. I am wondering if using Homebrew to install rbenv, will it be supported? I can't seems to get it done no matter what rbenv_custom_path I use

/usr/local/bin/rbenv
/Users/mech/.rbenv/shims/ruby
/Users/mech/.rbenv/versions/2.1.4/bin/ruby

If I set as this:

set :rbenv_ruby, '2.1.4'
set :rbenv_custom_path, '/Users/mech/.rbenv'

I am unable to make it work with these:

set :rbenv_custom_path, '/usr/local/Cellar/rbenv/0.4.0'
set :rbenv_path, '/usr/local/Cellar/rbenv/0.4.0' # Is there such a thing?

I always will encounter this:

bash: /Users/mech/.rbenv/bin/rbenv: No such file or directory

It is quite obvious that I do not have this path: ~/.rbenv/bin/

@scmx
Copy link

scmx commented Jan 2, 2015

@mech Try this: ln -s /usr/local/Cellar/rbenv/0.4.0/bin ~/.rbenv/bin

(I used this for test deploying to a development osx machine https://github.com/standout/rails_db_dump_restore/blob/master/test/dummy/config/deploy.rb, so that I could make sure my cap db:pull task works. :)

@dombarnes
Copy link

I had to set
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} /usr/local/bin/rbenv exec"
in my deploy.rb - this way its not tied to a version specific rbenv, if Homebrew updates it

@jDeppen
Copy link

jDeppen commented Sep 20, 2017

@scmx said (thank you) .../0.4.0/... but my version is 1.1.1
Check your version with ls /usr/local/Cellar/rbenv/

This was the answer for me:
ln -s /usr/local/Cellar/rbenv/1.1.1/bin ~/.rbenv/bin

I don't know if this is the best long-term solution (what happens when rbenv is updated?) but it works now.
@dombarnes, that didn't work for me. I got
bundle stderr: bash: /usr/local/bin/rbenv: No such file or directory even though /usr/local/bin/rbenv symlinks to ../Cellar/rbenv/1.1.1/bin/rbenv
I'm using ZSH, maybe that's why? @mech, are you using ZSH?

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

4 participants