0

I see the seeing an error when trying to run rails console with jruby 1.9 compatibility. This works fine when I run rails console in 1.8 mode.

I am using the following,

  • rvm (1.8.1)
  • jruby (1.6.4)
  • rails (3.2.5)
  • mongoid (2.4.11)
  • Mac OSX Lion

When I created the rails application I had jruby set to 1.8 compatibility. I don't know if this was the root cause of my problem but I am facing issues creating the project with 1.9 compatibility because bundle install seems to hang in 1.9 compat mode.

Error as below

trendy@~/rails/contacts : JRUBY_OPTS=--1.9 rails c
LoadError: load error: /Users/trendy/rails/contacts/config/environment --     java.lang.NullPointerException: null
           require at org/jruby/RubyKernel.java:1047
  require_environment! at /Users/trendy/.rvm/gems/jruby-1.6.4@contacts/gems/railties-3.2.5/lib/rails/application.rb:103
            (root) at /Users/trendy/.rvm/gems/jruby-1.6.4@contacts/gems/railties-3.2.5/lib/rails/commands.rb:40
           require at org/jruby/RubyKernel.java:1047
            (root) at script/rails:6
Moiz Raja
  • 5,612
  • 6
  • 40
  • 52
  • Looks like this was an issue with the version of jruby I had on. Upgraded to 1.6.7 and this issue is gone!! – Moiz Raja Jun 10 '12 at 18:41
  • See related http://stackoverflow.com/questions/10971127/creating-new-rails-project-with-jruby-in-1-9-compatibility-mode-hangs-when-runni – Moiz Raja Jun 10 '12 at 18:47

0 Answers0