NPE when loading rails
----------------------
Key: JRUBY-5967
URL: https://jira.codehaus.org/browse/JRUBY-5967
Project: JRuby
Issue Type: Bug
Components: Application Error
Affects Versions: JRuby 1.6.3
Environment: Debian Linux amd64, rails 3.0.9, JRUBY_OPTS=--1.9
Reporter: James Healy
Priority: Minor
If I create a new rails 3.0.9 app:
jruby -S rails new foo
Change the Gemfile to this:
source 'http://rubygems.org'
gem 'rails', '3.0.9'
gem 'delayed_job', "2.1.4"
Run bundle update:
jruby -S bundle update --local
and try to load a console:
./script/rails c
I get a NPE:
⚡ ./script/rails c
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
LoadError: load error: active_record/base -- java.lang.NullPointerException:
null
(root) at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/serialization/active_record.rb:1
require at org/jruby/RubyKernel.java:1047
require at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239
load_dependency at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225
new_constants_in at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596
new_constants_in at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:595
load_dependency at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225
require at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239
backend= at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/serialization/active_record.rb:34
guess_backend at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:43
Railtie at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/railtie.rb:7
instance_exec at org/jruby/RubyBasicObject.java:1743
run at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:25
run_initializers at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:50
each at org/jruby/RubyArray.java:1603
run_initializers at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:49
initialize! at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:134
__send__ at org/jruby/RubyBasicObject.java:1684
send at org/jruby/RubyKernel.java:2113
method_missing at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:77
(root) at /home/jh/tmp/foo/config/environment.rb:5
require at org/jruby/RubyKernel.java:1047
require_environment! at /home/jh/tmp/foo/config/environment.rb:103
(root) at
/home/jh/downloads/jruby-1.6.3/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:22
require at org/jruby/RubyKernel.java:1047
(root) at ./script/rails:6
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email