jon.niesen
jon.niesen

Reputation: 51

Can't use Jruby with Rbenv on Snow-Leopard

I just installed jruby using the ruby-build plugin for rbenv.

> rbenv install jruby-1.6.7
Downloading jruby-1.6.7.tar.gz...
-> http://cloud.github.com/downloads/sstephenson/ruby-build-download-mirror/fd1b8d7389aa92da69ea6efb4782e40a
Installing jruby-1.6.7...
Installed jruby-1.6.7

Then set my ruby version to jruby

> rbenv local jruby-1.6.7

Then try to do something with jruby

> jruby

or

> gem list

I keep getting back:

execv failed: Permission denied (13)

The Jruby binary and Java are both executable. My Java Version:

java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)

Upvotes: 1

Views: 380

Answers (2)

jon.niesen
jon.niesen

Reputation: 51

I added the following to my .zshrc

export JAVACMD=`which java`

Upvotes: 2

Will
Will

Reputation: 4376

Dont quote me on this, but it worked for me.

I had been using https://github.com/flatland/drip which I had installed brew on osx snow leopard.

Warning first: run echo $JAVACMD && echo $JAVA_HOME and save what those are in case you need them

When I uninstalled drip with brew I was getting the same error... I ran.

unset JAVA_HOME

and

unset JAVACMD

and I was back in business

Upvotes: 0

Related Questions