I had the same problem. There was a library I loaded with require
‘digit_validations’ in environment.rb
then I used it in a model to “include DigitValidations”
digit_validations.rb looked like this:
module DigitValidations
class DiVa
…
end
end
going to script/console and doing a reload!, showed me that I couldn’t
reload:
reload!
Reloading…
NameError: cannot remove Object::DiVa
from
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:423:in remove_const' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:423:in send’
from
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:423:in remove_constant' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:274:in remove_unloadable_constants!’
from
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:274:in each' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:274:in remove_unloadable_constants!’
from
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:73:in clear' from /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:60:in reset_application!’
from
/opt/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/console_app.rb:26:in
`reload!’
from (irb):15
from :0
I removed the “include DigitValidations” from my models and changed the
source where appropriate.