0

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?

1 Answer 1

1

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.

3
  • Thanks for your suggestions.I have installed the rack gem but i still get the error. Do you think there is a work around? or do i absolutely need to upgrade rails?
    – Wasi
    Jan 16, 2013 at 17:43
  • you probably just need to create a vanilla config.ru file in your root folder. Jan 16, 2013 at 18:21
  • although given the seriousness of last weeks rails bug, I would upgrade to 2.3 latest :) If you can get it to 2.3.8 then you can iterate forward through the point releases fixing the deprecations as they're raised. Jan 16, 2013 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.