I am using:
jruby 1.7.2 (ruby-1.8.7p370)
Rails 2.0.2
jruby-jars-1.7.2
jruby-rack-1.1.13.1
rake (10.0.3, 0.8.1) Rake 10.0.3 was installed by Warbler
I get the following error when I access the application:
org.jruby.rack.RackInitializationException: uninitialized constant Rack::Builder
from /usr/share/tomcat6/webapps/app/WEB-INF/gems/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:266:in `load_missing_constant'
from /usr/share/tomcat6/webapps/app/WEB-INF/gems/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in `const_missing'
from null:1:in `(root)'
How can i solve this?
That’s a really old version of rails! 🙂 You should take it to the 2.3 branch if at all possible. I would be highly doubtful you won’t have issues running it in jruby 1.7.1, as that runs as ruby 1.9 code. You might want to first dial it back to the last 1.6 version as it’ll run in ruby 1.8.7 by default.
Also you may be too ambitious in using a newer tomcat. You should check out the trinidad gem as it may support you better on a legacy application.
However the gist of the issue is you’re using a version of ruby that requires rack. Which I doubt you have in a rails app that is that old. IIRC it didn’t come around until 2.2-ish.