`rbenv install jruby-1.6.7` not working #155

Closed
ansdma opened this Issue Apr 12, 2012 · 27 comments

Projects

None yet

2 participants

@ansdma

I'm not sure if this command supposed to work but what I get is definition not found: jruby-1.6.7

@lostAstronaut

Where do you have rbenv installed?

@ansdma

This what I get for which rbenv

rbenv () {
    command="$1" 
    if [ "$#" -gt 0 ]
    then
        shift
    fi
    case "$command" in
        (shell) eval `rbenv "sh-$command" "$@"` ;;
        (*) command rbenv "$command" "$@" ;;
    esac
}

Anyway, it's installed in /usr/local/Cellar/rbenv/0.3.0

@lostAstronaut

What do you get with echo $PATH

@ansdma

/Users/Ans/.rbenv/shims:/Users/Ans/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin

@lostAstronaut

okay it's a path issue, your going to have to edit your bash_profile, type

open ~/.bash_profile

Then it will open in your text editor, next you need to change yours so that it looks like this,

export PATH="/usr/local/Cellar/rbenv/bin:$PATH"
export RBENV_ROOT=/usr/local/Cellar/rbenv
export PATH="$RBENV_ROOT/shims:$RBENV_ROOT/bin:$PATH"

That will make sure you can type

jbenv install jruby-1.6.7

@lostAstronaut

$PATH issues seem to be common with installing to the /usr/local directory.

@ansdma

Now my path: /usr/local/Cellar/rbenv/shims:/usr/local/Cellar/rbenv/bin:/usr/local/Cellar/rbenv/bin:/usr/local/Cellar/rbenv/shims:/Users/Ans/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
but I still got the same ruby-build: definition not found: jruby-1.6.7 error

@lostAstronaut

try deleting /Users/Ans/.rbenv/bin

@lostAstronaut

then (assuming you installed ruby-build as a plugin) type
ls /usr/local/Cellar/rbenv/plugins/ruby-build/share

@ansdma

There's no bin directory in .rbenv. Also no ruby-build or plugins in usr/local/Cellar/rbenv

@lostAstronaut

well it is in your PATH, so just delete the whole/users/ans/.rbenv directory Then I want you to type the

ls /usr/local/Cellar/rbenv/plugins/ruby-build/share

that I mentioned above and also

ls /usr/local/Cellar/rbenv/plugins

@ansdma

Sorry, seems my PATH is messy :) anyway seems I don't have these directories!
ls: /usr/local/Cellar/rbenv/plugins/ruby-build/share: No such file or directory
ls: /usr/local/Cellar/rbenv/plugins: No such file or directory

@lostAstronaut

okay, where then is ruby-build installed.

@ansdma

/usr/local/Cellar/rbenv/ruby-build as I've installed it using brew

@lostAstronaut

Typels /usr/local/Cellar/rbenv/ruby-build/share

@ansdma

ls: /usr/local/Cellar/rbenv/ruby-build/share: No such file or directory :(

@lostAstronaut

Odd. ls /usr/local/Cellar/rbenv/ruby-build

@ansdma

ls: /usr/local/Cellar/rbenv/ruby-build: No such file or directory. ruby-build is installed at /usr/local/Cellar/ruby-build/20120216 so ls gives:

INSTALL_RECEIPT.json README.md            share
LICENSE              bin

and the share dir got:

ruby-build

@lostAstronaut

and ls share/ruby-build gives you all the different ruby versions I assume.

@ansdma

yep

1.8.6-p383        1.9.2-p180        jruby-1.6.4       ree-1.8.7-2009.09
1.8.6-p420        1.9.2-p290        jruby-1.6.5       ree-1.8.7-2010.01
1.8.7-p249        1.9.3-dev         jruby-1.6.5.1     ree-1.8.7-2010.02
1.8.7-p302        1.9.3-p0          jruby-1.6.6       ree-1.8.7-2011.03
1.8.7-p334        1.9.3-p125        jruby-1.7.0-dev   ree-1.8.7-2011.12
1.8.7-p352        1.9.3-preview1    maglev-1.0.0      ree-1.8.7-2012.01
1.8.7-p357        1.9.3-rc1         rbx-1.2.4
1.8.7-p358        2.0.0-dev         rbx-2.0.0-dev
1.9.1-p378        jruby-1.6.3       ree-1.8.6-2009.06
@lostAstronaut

Well then instead of making a workaround why dont you just make a directory in usr/local/Cellar/rbenv called plugins then move ruby-build into it so that the path usr/local/Cellar/rbenv/plugins/ruby-build/share/ruby-build has all those good versions and your $PATH will work well as well.

Tell me if that works.

@ansdma

I did brew uninstall ruby-build then

mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
git clone git://github.com/sstephenson/ruby-build.git

however, rbenv install jruby-1.6.7 now gives rbenv: no such command 'install' am I missing something here?

@lostAstronaut

This may seem bad, but it is actually progress, now go ahead and ls /usr/local/Cellar/rbenv/plugins I want to make sure its there, the reason why you dont have install is that it is the result of ruby-build being set all the way up.

Also tell me what your $PATH looks like.

@ansdma

ls: /usr/local/Cellar/rbenv/plugins: No such file or directory thats because I've cloned it to ~/.rbenv/plugins

@lostAstronaut

Okay while that "should work" since your installing in the /usr/local directory you need ruby-build to be actually in the plugins directory inside of the /usr/local/Cellar/rbenv AND your $PATH please, so put that plugins directory inside your local rbenv.

@lostAstronaut

I think this issue can be closed, seems to be an installed problem.

@ansdma

will.... not quit sure where the problem was! I fellowed the installation process for both rbenv and ruby-build but got into this problem! anyhow this issue can be closed. Thank you very much for your valuable help :)

@ansdma ansdma closed this May 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment