ratnikov/appengine-rails3 — Issue #1: rails console error - no api environment registered
Author: pricejdp
Created: 2012-01-24 20:03:32+00:00
State: open

In the console, when trying to see all the Comment objects, I get a NullPointerException. I tried running the command with development environment specified and I got the same. Maybe this is a known issue?

NativeException: java.lang.NullPointerException: No API environment is registered for this thread.

from com/google/appengine/api/datastore/DatastoreApiHelper.java:108:in `getCurrentAppId'
from com/google/appengine/api/datastore/DatastoreApiHelper.java:118:in `getCurrentAppIdNamespace'
from com/google/appengine/api/datastore/Query.java:112:in `'
from sun/reflect/NativeConstructorAccessorImpl.java:-2:in `newInstance0'
from sun/reflect/NativeConstructorAccessorImpl.java:39:in `newInstance'
from sun/reflect/DelegatingConstructorAccessorImpl.java:27:in `newInstance'
from java/lang/reflect/Constructor.java:513:in `newInstance'
from org/jruby/javasupport/JavaConstructor.java:275:in `newInstanceDirect'
from /home/joseph/dev/Ruby/appengine-rails3/lib/thrust/datastore/connection.rb:35:in `query'
from /home/joseph/dev/Ruby/appengine-rails3/lib/thrust/datastore/record.rb:87:in `query'
from /home/joseph/dev/Ruby/appengine-rails3/lib/thrust/datastore/record.rb:32:in `all'
from (irb):2:in `evaluate'
from org/jruby/RubyKernel.java:1088:in `eval'
from /home/joseph/.rvm/rubies/jruby-1.6.5.1/lib/ruby/1.8/irb.rb:158:in `eval_input'
from /home/joseph/.rvm/rubies/jruby-1.6.5.1/lib/ruby/1.8/irb.rb:271:in `signal_status'
from /home/joseph/.rvm/rubies/jruby-1.6.5.1/lib/ruby/1.8/irb.rb:155:in `eval_input'
from org/jruby/RubyKernel.java:1420:in `loop'
from org/jruby/RubyKernel.java:1192:in `catch'
from /home/joseph/.rvm/rubies/jruby-1.6.5.1/lib/ruby/1.8/irb.rb:154:in `eval_input'
from /home/joseph/.rvm/rubies/jruby-1.6.5.1/lib/ruby/1.8/irb.rb:71:in `start'
from org/jruby/RubyKernel.java:1192:in `catch'
from /home/joseph/.rvm/rubies/jruby-1.6.5.1/lib/ruby/1.8/irb.rb:70:in `start'
from /home/joseph/.rvm/gems/jruby-1.6.5.1/gems/railties-3.0.7/lib/rails/commands/console.rb:44:in `start'
from /home/joseph/.rvm/gems/jruby-1.6.5.1/gems/railties-3.0.7/lib/rails/commands/console.rb:8:in `start'
from /home/joseph/.rvm/gems/jruby-1.6.5.1/gems/railties-3.0.7/lib/rails/commands.rb:23:in `(root)'
from org/jruby/RubyKernel.java:1038:in `require'