This project is archived and is in readonly mode.

#2833 ✓invalid
Tom

HttpMock not initialized in the Rails 2.3.2 GEM

Reported by Tom | June 24th, 2009 @ 09:06 PM | in 2.x

I am receiving the following error on any of my Rails projects on OSX with the Rails 2.3.2 GEM.

NameError: uninitialized constant ActiveResource::HttpMock

This can be reproduced by just opening a console as follows:

script/console
Loading development environment (Rails 2.3.2)
>> ActiveResource
=> ActiveResource
>> ActiveResource::HttpMock
NameError: uninitialized constant ActiveResource::HttpMock
    from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:440:in `load_missing_constant'
    from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:80:in `const_missing_not_from_s3_library'
    from /Library/Ruby/Gems/1.8/gems/aws-s3-0.5.1/lib/aws/s3/extensions.rb:174:in `const_missing'
    from (irb):2

Thanks,
Tom

Comments and changes to this ticket

  • Pat Nakajima

    Pat Nakajima June 24th, 2009 @ 09:35 PM

    Try updating your aws-s3 gem. The most recent version is 0.6.2.

  • Tom

    Tom June 24th, 2009 @ 09:38 PM

    I just updated my aws-s3 gem, but no joy:

    ActiveResource::HttpMock NameError: uninitialized constant ActiveResource::HttpMock

    from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:440:in `load_missing_constant'
    from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:80:in `const_missing_not_from_s3_library'
    from /Library/Ruby/Gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:206:in `const_missing'
    from (irb):1
    

    Is there a reason the traceback is referencing the aws-s3 gem?

  • Tom

    Tom June 24th, 2009 @ 09:48 PM

    I went ahead and uninstalled the aws-s3 gem totally just to see if it made a difference. I get the same error though:

    >> ActiveResource::HttpMock
    NameError: uninitialized constant ActiveResource::HttpMock
        from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:440:in `load_missing_constant'
        from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:80:in `const_missing'
        from (irb):1
    
  • Tom

    Tom June 25th, 2009 @ 02:54 AM

    Okay, so I need to add the line:

    require 'active_resource/http_mock'
    

    That is probably just poorly documented and not a bug. Sorry!

  • Yehuda Katz (wycats)

    Yehuda Katz (wycats) July 2nd, 2009 @ 07:59 PM

    • State changed from “new” to “invalid”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages