Error on request, rails tries to call {}.requires_reloading?


#1

Hello!

I’ve got the next problem, when my rails application tries to resolve
a request it calls the method “requires_reloading?” to a empty hash.

The webrick trace is:

[2007-02-13 10:23:56] INFO WEBrick 1.3.1
[2007-02-13 10:23:56] INFO ruby 1.8.4 (2005-12-24) [i486-linux]
[2007-02-13 10:23:56] INFO WEBrick::HTTPServer#start: pid=8327
port=3000
#<NoMethodError: undefined method requires_reloading?' for {}:Hash> ["/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:93:inclear_reloadable_connections!’", “/usr/lib/ruby/gems/1.8/gems/
activerecord-1.15.2/lib/active_record/connection_adapters/abstract/
connection_specification.rb:92:in clear_reloadable_connections!'", "/ usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/dispatcher.rb:65:inreset_application!’”, “/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/
dispatcher.rb:116:in reset_after_dispatch'", "/usr/lib/ruby/gems/1.8/ gems/rails-1.2.2/lib/dispatcher.rb:51:indispatch’”, “/usr/lib/ruby/
gems/1.8/gems/rails-1.2.2/lib/webrick_server.rb:113:in
handle_dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/ webrick_server.rb:79:inservice’”, “/usr/lib/ruby/1.8/webrick/
httpserver.rb:104:in service'", "/usr/lib/ruby/1.8/webrick/ httpserver.rb:65:inrun’”, “/usr/lib/ruby/1.8/webrick/server.rb:
173:in start_thread'", "/usr/lib/ruby/1.8/webrick/server.rb:162:instart_thread’”, “/usr/lib/ruby/1.8/webrick/server.rb:95:in start'", "/usr/lib/ruby/1.8/webrick/server.rb:92:instart’”, “/usr/lib/ruby/
1.8/webrick/server.rb:23:in start'", "/usr/lib/ruby/1.8/webrick/ server.rb:82:instart’”, “/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/
webrick_server.rb:63:in dispatch'", "/usr/lib/ruby/gems/1.8/gems/ rails-1.2.2/lib/commands/servers/webrick.rb:59", "/usr/local/lib/ site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’”, “/usr/lib/
ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/
dependencies.rb:495:in require'", "/usr/lib/ruby/gems/1.8/gems/ activesupport-1.4.1/lib/active_support/dependencies.rb:342:innew_constants_in’”, “/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/
lib/active_support/dependencies.rb:495:in require'", "/usr/lib/ruby/ gems/1.8/gems/rails-1.2.2/lib/commands/server.rb:39", "/usr/local/lib/ site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’”, “script/
server:3”]
[2007-02-13 10:24:00] ERROR `/batch_processes/list’ not found.

I’ve patched my code with this code in environment.rb:
class Hash
def requires_reloading?
false
end
end

With this code everything works but it’s clear that isn’t the right
solution, any idea?

Thanks a lot,
Sergio Espeja

http://spejman.blogspot.com
http://bee.com.es


#2

I’m encountering the same problem … looks like it might be a rails
1.2.2 problem - I just upgraded from 1.1.6.

On Feb 13, 1:40 am, “removed_email_address@domain.invalid”