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