Rake gems (in /opt/SDK/domains/domain1/autodeploy/jruby_deploy_test) rake aborted! Please install t

hi, RoR.

i’m workin with RoR just 3 days, and i have this trouble:

rake gems

(in /opt/SDK/domains/domain1/autodeploy/jruby_deploy_test)
rake aborted!
Please install the jdbcmysql adapter: gem install activerecord- jdbcmysql-adapter (no such file to load – java)

maybe i should write PATH to java in my .bashrc? or smth. else? thx

Luthien wrote:

hi, RoR.

i’m workin with RoR just 3 days, and i have this trouble:

rake gems

(in /opt/SDK/domains/domain1/autodeploy/jruby_deploy_test)
rake aborted!
Please install the jdbcmysql adapter: gem install activerecord- jdbcmysql-adapter (no such file to load – java)

maybe i should write PATH to java in my .bashrc? or smth. else? thx

Did you follow the instructions in the error message?

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

of course:

gem install activerecord-jdbcmysql-adapter

Successfully installed activerecord-jdbcmysql-adapter-0.9.1
1 gem installed
Installing ri documentation for activerecord-jdbcmysql-
adapter-0.9.1…
Updating class cache with 1519 classes…
Installing RDoc documentation for activerecord-jdbcmysql-
adapter-0.9.1…

but error message is still the same…
jruby script/server is working, but i can’t migrate my db etc.

On 4 авг, 20:42, Marnen Laibow-Koser <rails-mailing-l…@andreas-

yeap, but it doesn’t change anything…
the result is the same

On Tue, Aug 4, 2009 at 11:06 AM, Luthien[email protected] wrote:

of course:

gem install activerecord-jdbcmysql-adapter

Successfully installed activerecord-jdbcmysql-adapter-0.9.1
1 gem installed

but error message is still the same…
jruby script/server is working, but i can’t migrate my db etc.

Uh, do you have both Ruby and JRuby on this machine?

If so I’d guess you need to do

jruby -S gem install activerecord-jdbcmysql-adapter


Hassan S. ------------------------ [email protected]
twitter: @hassan

On Tue, Aug 4, 2009 at 2:26 PM, Luthien[email protected] wrote:

luthien@luthien-laptop:~$ jruby -S rake gems
/opt/jruby-1.3.1/bin/jruby: line 337: /etc/java//bin/java: No such
file or directory

luthien@luthien-laptop:~$ which java
/usr/bin/java

OK, that’s wierd – what does java -version produce?

luthien@luthien-laptop:~$ echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/
games:

I would:
delete =>
/opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/glassfish-0.9.5-universal-java/bin
put this first in your path => /opt/jruby-1.3.1/bin
delete => /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems

And try again, using the “jruby -S” command format


Hassan S. ------------------------ [email protected]
twitter: @hassan

On Tue, Aug 4, 2009 at 11:26 AM, Luthien[email protected] wrote:

yeap, but it doesn’t change anything…
the result is the same

And you are also trying

jruby -S rake gems

?
(And are you really trying to run this all as root? Probably a bad
idea.)

Anyway, if jruby -S rake gems is failing, show us the output of
which jruby
which java
which gem
which rake
echo $PATH


Hassan S. ------------------------ [email protected]
twitter: @hassan

luthien@luthien-laptop:~$ jruby -S rake gems
/opt/jruby-1.3.1/bin/jruby: line 337: /etc/java//bin/java: No such
file or directory
/opt/jruby-1.3.1/bin/jruby: line 337: exec: /etc/java//bin/java:
cannot execute: No such file or directory
luthien@luthien-laptop:~$ which ruby
/usr/local/bin/ruby
luthien@luthien-laptop:~$ which java
/usr/bin/java
luthien@luthien-laptop:~$ which gem
/usr/local/bin/gem
luthien@luthien-laptop:~$ which rake
/usr/local/bin/rake
luthien@luthien-laptop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/
games:/opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/glassfish-0.9.5-
universal-java/bin:/opt/jruby-1.3.1/bin/:/opt/jruby-1.3.1/lib/ruby/
gems/1.8/gems/

Ok, that is echo $PATH:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/
X11R6/bin:/opt/jruby-1.3.1/bin/:/opt/SDK/bin/

thx a lot, but appears another problem:

jruby -S rake gems

(in /opt/SDK/domains/domain1/autodeploy/jruby_deploy_test)

I = Installed
F = Frozen
R = Framework (loaded before rails starts)

despite all gems are installed…

jruby -S rake gems

(in /opt/SDK/domains/domain1/autodeploy/jruby_deploy_test)

I = Installed
F = Frozen
R = Framework (loaded before rails starts)

despite all gems are installed…
that’s not really a problem. “rake gems” reports gems used/frozen by
the rails application you are located in (not all gems installed)

thanks in advance. working correctly, i hope :slight_smile:

my guess:
you are trying to call your cruby rake (“rake gems”, see my post
above) in a jruby rails application which requires activerecord-
jdbcmysql-adapter which requires java (gem) which is only available
for jruby…