Class loading problem


#1

Hi, I am working on creating a rails app. template that will create a
base
rails app that is ready for use with the google app engine. I have
everything working except for the session management. The problem is
not
releated to gae/J it has to do with loading a class. Whenever I try to
start the server (locally or on the app engine) i get this exception.

Expected /home/josh/code/gaej_rails/test/lib/big_table_servlet_store.rb
to
define BigTableServletStore (LoadError)
from
/home/josh/code/gaej_rails/test/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in
const_missing_with_dependencies' from /home/josh/code/gaej_rails/test/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:inconst_missing’
from
/home/josh/code/gaej_rails/test/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in
load_missing_constant' from /home/josh/code/gaej_rails/test/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:inconst_missing_with_dependencies’
from
/home/josh/code/gaej_rails/test/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in
load_missing_constant' from /home/josh/code/gaej_rails/test/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:inconst_missing_with_dependencies’
from
/home/josh/code/gaej_rails/test/vendor/rails/actionpack/lib/action_controller/session_management.rb:18:in
session_store=' from script/../config/../vendor/rails/railties/lib/initializer.rb:580:ininitialize_framework_settings’
… 13 levels…
from
/home/josh/code/gaej_rails/test/vendor/rails/railties/lib/commands/server.rb:31:in
require' from /usr/local/share/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from script/server:3

I am using the BigTable Session store written by Ola and it is working
fine
for his app. But, it fails for mine. Does anybody know what i am
missing
to make this work? i have required it

Thanks,

Josh


#2

On Apr 16, 2009, at 8:31 PM, Josh M. wrote:

lib/active_support/dependencies.rb:80:in
from /home/josh/code/gaej_rails/test/vendor/rails/activesupport/
custom_require.rb:31:in `require’
from script/server:3

I am using the BigTable Session store written by Ola and it is
working fine for his app. But, it fails for mine. Does anybody
know what i am missing to make this work? i have required it

Thanks,

Josh

I haven’t had any experience with GAE or BigTableServletStore but we
recently saw a similar error in our own Rails apps. In our case, it
was a ruby file that re-opened a java class for extending. Even though
the .rb file was ‘required’ it turned out that elsewhere there was
some code referencing the Constant triggering Rails to do its
dependency loading thing. Based on the naming conventions it did find
the file but bombed out with that error when it hit the include_class
‘my.java.class’ line. My solution was to move the .rb file into a
subdir just to make sure it wouldn’t get picked up Rails dependencies
loading. Is big_table_servlet_store.rb just a plain old ruby class or
is it an extension of a Java class?

-lenny


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email