Forum: Ruby on Rails Error on request, rails tries to call {}.requires_reloading?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
(Guest)
on 2007-02-13 11:41
(Received via mailing list)
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:in
`clear_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:in
`reset_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:in `dispatch'", "/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:in `service'", "/usr/lib/ruby/1.8/webrick/
httpserver.rb:104:in `service'", "/usr/lib/ruby/1.8/webrick/
httpserver.rb:65:in `run'", "/usr/lib/ruby/1.8/webrick/server.rb:
173:in `start_thread'", "/usr/lib/ruby/1.8/webrick/server.rb:162:in
`start_thread'", "/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'",
"/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'", "/usr/lib/ruby/
1.8/webrick/server.rb:23:in `start'", "/usr/lib/ruby/1.8/webrick/
server.rb:82:in `start'", "/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:in `require'", "/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:in
`new_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:in `require'", "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
john (Guest)
on 2007-02-15 07:34
(Received via mailing list)
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"
This topic is locked and can not be replied to.