I find it very difficult to get jRuby on Rails 3 installed on Tomcat 6. I got it to work exactly once.
I modified my database.yaml and Gemfile to check jRuby, something like this:
if defined?(JRUBY_VERSION)
gem 'jdbc-mysql'
gem 'activerecord-jdbc-adapter'
gem 'activerecord-jdbcmysql-adapter'
gem 'jruby-openssl'
gem 'jruby-rack'
gem 'warbler'
else
gem 'mysql'
gem "mongrel"
gem 'ruby-debug'
end
Some environment settings:
$ rvm -v
rvm 1.0.14
$ jruby -v
jruby 1.5.3 (ruby 1.8.7 patchlevel 249) (2010-09-28 7ca06d7) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_20) [x86_64-java]
When I start jruby -S bundle install, everything goes smoothly.
When I try to do something like rake db:migrate, jruby -S rake db:migrateor warble, I get 50 DEPRECATION WARNINGS and a possible stack stream.
I solved this problem by removing the warbler plugin, it didn’t like the line Warbler::Task.new
Then I ran warble configto give me the config / warbler.rb file.
And finally, warbleto create my .war file. So far so good.
Now I am moving the .war file to my Tomcat webapps. Everything works fine except for the error:
Oct 10, 2010 1:34:46 AM org.apache.catalina.core.ApplicationContext log
SEVERE: Application Error
org.jruby.rack.RackInitializationException:
http://github.com/plataformatec/devise.git (at master) is not checked out.
Please run 'bundle install'
, webapps/myapp/WEB-INF jruby -S bundle install
, , .