unable to c jruby gems (seems to be)

3 views
Skip to first unread message

khelll

unread,
Nov 8, 2008, 8:02:03 AM11/8/08
to jetty-rails
When trying to run jetty_rails i get errors regarding installed gems,
like openssl and mysqljdb :

khelll@khelll-laptop:~/projects/jd1g$ jruby -S
jetty_rails
2008-11-08 14:55:43.190::INFO: Logging to STDERR via
org.mortbay.log.StdErrLog
starting
3000
2008-11-08 14:55:43.589::INFO:
jetty-6.1.9
2008-11-08 14:55:43.708::INFO: NO JSP Support for /, did not find
org.apache.jasper.servlet.JspServlet
2008-11-08 14:55:43.056:/:INFO: Info: using runtime pool timeout of
30 seconds
2008-11-08 14:55:43.056:/:INFO: Info: received min runtimes =
1
2008-11-08 14:55:43.056:/:INFO: Info: received max runtimes =
5
JRuby limited openssl loaded. gem install jruby-openssl for full
support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
2008-11-08 14:55:48.253:/:WARN: Error: unable to initialize
application
org.jruby.rack.RackInitializationException: Please install the
jdbcmysql adapter: `gem install activerecord-jdbcmysql-adapter` (no
such file to load -- active_record/connection_adapters/
jdbcmysql_adapter)
from /home/khelll/projects/jruby/lib/ruby/gems/1.8/gems/
activerecord-2.1.2/lib/active_record/connection_adapters/abstract/
connection_specification.rb:216:in
`establish_connection'
from /home/khelll/projects/jruby/lib/ruby/gems/1.8/gems/
activerecord-2.1.2/lib/active_record/connection_adapters/abstract/
connection_specification.rb:209:in
`establish_connection'
from /home/khelll/projects/jruby/lib/ruby/gems/1.8/gems/
rails-2.1.2/lib/initializer.rb:341:in
`initialize_database'
from /home/khelll/projects/jruby/lib/ruby/gems/1.8/gems/
rails-2.1.2/lib/initializer.rb:124:in
`process'
from /home/khelll/projects/jruby/lib/ruby/gems/1.8/gems/
rails-2.1.2/lib/initializer.rb:97:in
`run'
from /home/khelll/projects/jd1g/config/environment.rb:
15
from /home/khelll/projects/jd1g/config/environment.rb:29:in
`load'
from file:/home/khelll/projects/jruby/lib/ruby/gems/1.8/gems/
jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:29:in
`load_environment'
from file:/home/khelll/projects/jruby/lib/ruby/gems/1.8/gems/
jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:152:in
`new'
from <script>:
3
from file:/home/khelll/projects/jruby/lib/ruby/gems/1.8/gems/
jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/rack/builder.rb:22:in
`instance_eval'
from file:/home/khelll/projects/jruby/lib/ruby/gems/1.8/gems/
jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/rack/builder.rb:22:in
`initialize'
from <script>:
3

at org.jruby.rack.DefaultRackApplicationFactory
$4.init(DefaultRackApplicationFactory.java:154)
at org.jruby.rack.PoolingRackApplicationFactory
$1.run(PoolingRackApplicationFactory.java:154)
at java.lang.Thread.run(Thread.java:
619)
Caused by:
org.jruby.exceptions.RaiseException
at Kernel.raise(/home/khelll/projects/jruby/lib/ruby/gems/1.8/
gems/activerecord-2.1.2/lib/active_record/connection_adapters/abstract/
connection_specification.rb:
232)
at #<Class:01x80b973>.establish_connection(/home/khelll/
projects/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/
active_record/connection_adapters/abstract/connection_specification.rb:
216)
at #<Class:01x80b973>.establish_connection(/home/khelll/
projects/jruby/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/
active_record/connection_adapters/abstract/connection_specification.rb:
209)
at #<Class:01x80b973>.establish_connection(/home/khelll/
projects/jruby/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:
341)
at Rails::Initializer.initialize_database(/home/khelll/
projects/jruby/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:
124)
at Rails::Initializer.process(/home/khelll/projects/jruby/lib/
ruby/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:
97)
at #<Class:01x70c242>.run(/home/khelll/projects/jd1g/config/
environment.rb:
15)
at (unknown).(unknown)(/home/khelll/projects/jd1g/config/
environment.rb:
29)
at Kernel.load(file:/home/khelll/projects/jruby/lib/ruby/gems/
1.8/gems/jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:
29)
at JRuby::Rack::RailsServletHelper.load_environment(file:/home/
khelll/projects/jruby/lib/ruby/gems/1.8/gems/jetty-rails-0.6/lib/jruby-
rack-0.9.2.jar!/jruby/rack/rails.rb:
152)
at #<Class:01x16068c9>.new(<script>:3)
at (unknown).(unknown)(file:/home/khelll/projects/jruby/lib/
ruby/gems/1.8/gems/jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/rack/
builder.rb:22)
at Kernel.instance_eval(file:/home/khelll/projects/jruby/lib/
ruby/gems/1.8/gems/jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/rack/
builder.rb:22)
at Kernel.instance_eval(file:/home/khelll/projects/jruby/lib/
ruby/gems/1.8/gems/jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/rack/
builder.rb:22)
at Rack::Builder.initialize(<script>:3)
at (unknown).(unknown)(:1)
2008-11-08 14:56:14.614::INFO: Started
SelectChann...@0.0.0.0:3000

Fabio Kung

unread,
Nov 9, 2008, 10:15:37 AM11/9/08
to jetty...@googlegroups.com
Hi khell,

You must have all gems that your application uses installed in jruby, before trying jetty_rails. In fact, you should be able to run your app with "jruby script/server" if you aren't using any java stuff like servlets and context params. 

The jruby-openssl is optional, but do you have the activerecord-jdbcmysql-adapter gem installed? What about the rails gem?

Try installing the adapter with:

jruby -S gem install activerecord-jdbcmysql-adapter

(in the same jruby that is running jetty-rails).

Cheers,
--
Fabio Kung
http://www.fabiokung.com

Caelum - Ensino e Inovação
http://www.caelum.com.br

Khaled al Habache

unread,
Nov 9, 2008, 10:18:16 AM11/9/08
to jetty...@googlegroups.com
Sure i have them, i'am able to run the project using mongrel, but when trying jetty rails i get that error.....
___________________________
Eng Khaled al Habache

Fabio Kung

unread,
Nov 9, 2008, 10:21:45 AM11/9/08
to jetty...@googlegroups.com
Can you confirm the jruby you have in the PATH? Do you have any JRUBY_HOME variable defined (you shouldn't)?

$ which jruby

Is it the same that has the required gems installed?

Khaled al Habache

unread,
Nov 9, 2008, 10:29:12 AM11/9/08
to jetty...@googlegroups.com
which jruby :
/home/khelll/projects/jruby/bin/jruby

i had that environment variable called JRUBY_HOME and i removed it....

I tried again and it didn't work.

I could also run the project using glassfish gem....


___________________________
Eng Khaled al Habache



Fabio Kung

unread,
Nov 15, 2008, 11:59:32 AM11/15/08
to jetty...@googlegroups.com
Hi Khaled,

Have you had any progress on this?
Seems like an issue with jruby associated paths. Which version of jruby and rubygems are you using?

Which OS and version?

Khaled al Habache

unread,
Nov 15, 2008, 12:01:33 PM11/15/08
to jetty...@googlegroups.com
I'm using glassfish gem at the current moment, it's ok
Thanks

___________________________
Eng Khaled al Habache



Reply all
Reply to author
Forward
0 new messages