# Include ActiveResource

**URL:** <https://www.ruby-forum.com/t/include-activeresource/67282>\
**Category:** Rails\
**Created:** [September 1, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/include-activeresource/67282 "2006-09-01T20:35:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HHHHHH](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/50afbb/32.png) [@HHHHHH](https://www.ruby-forum.com/u/HHHHHH)\
**Post date:** [September 1, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/include-activeresource/67282/1 "2006-09-01T20:35:18Z")

</div>

Hello,

I want to give ActiveResource a spin.

I have all the code checked out from SVN in vendor/rails (yes, including  
ActiveResource).

I’m trying to make sure it gets loaded.

I did this in environment.rb:

config.load\_paths += %W( #{RAILS\_ROOT}/vendor/rails/activeresource/lib )

Unfortunately I still can’t use it. I have an ActiveResource derived  
model,  
Address:

class Address \< ActiveResource::Base  
self.site =  
“[http://ws.geonames.org/findNearestAddress?lat=:lat&lng=:long](http://ws.geonames.org/findNearestAddress?lat=:lat&lng=:long)”  
end

When I try to use it, I get the trace below.

Any ideas? Help very much appreciated.

Loading development environment.

> > my\_address = Address.new  
> > NameError: uninitialized constant ActiveResource  
> > from  
> > ./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesu  
> > pport/lib/active\_support/dependencies.rb:237:in `load_missing_constant' from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesu pport/lib/active_support/dependencies.rb:315:in `const\_missing’  
> > from  
> > ./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesu  
> > pport/lib/active\_support/dependencies.rb:322:in `const_missing' from ./script/../config/../config/../app/models/address.rb:1 from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesu pport/lib/active_support/dependencies.rb:343:in `load’  
> > from  
> > ./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesu  
> > pport/lib/active\_support/dependencies.rb:183:in `load_file' from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesu pport/lib/active_support/dependencies.rb:85:in `require\_or\_load’  
> > from  
> > ./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesu  
> > pport/lib/active\_support/dependencies.rb:219:in `load_missing_constant' from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesu pport/lib/active_support/dependencies.rb:315:in `const\_missing’  
> > from  
> > ./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesu  
> > pport/lib/active\_support/dependencies.rb:322:in `const\_missing’  
> > from (irb):1

---

<div class="post-metadata">

**Author:** ![HHHHHH](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/50afbb/32.png) [@HHHHHH](https://www.ruby-forum.com/u/HHHHHH)\
**Post date:** [September 1, 2006, 9:13pm UTC](https://www.ruby-forum.com/t/include-activeresource/67282/2 "2006-09-01T21:13:23Z")

</div>

On 9/1/06, HH [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I want to give ActiveResource a spin.
> 
> config.load\_paths += %W( #{RAILS\_ROOT}/vendor/rails/activeresource/lib )

Unfortunately I still can’t use it. I have an ActiveResource derived  
model,

> 

Address:

require ‘active\_resource’

class Address \< ActiveResource::Base

> self.site = "  
> [http://ws.geonames.org/findNearestAddress?lat=:lat&lng=:long](http://ws.geonames.org/findNearestAddress?lat=:lat&lng=:long)"  
> end

jeremy

---

<div class="post-metadata">

**Author:** ![HHHHHH](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/50afbb/32.png) [@HHHHHH](https://www.ruby-forum.com/u/HHHHHH)\
**Post date:** [September 1, 2006, 9:35pm UTC](https://www.ruby-forum.com/t/include-activeresource/67282/3 "2006-09-01T21:35:27Z")

</div>

Sheesh, now I feel silly.

Rick had mentioned environment.rb and I never even though about just  
doing  
this.

Anyway, thanks.

From: Jeremy K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Reply-To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: Fri, 1 Sep 2006 12:04:16 -0700  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: [Rails] Re: Include ActiveResource

On 9/1/06, HH [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I want to give ActiveResource a spin.
> 
> config.load\_paths += %W( #{RAILS\_ROOT}/vendor/rails/activeresource/lib )  
> Unfortunately I still can’t use it. I have an ActiveResource derived model,  
> Address:

require ‘active\_resource’

> class Address \< ActiveResource::Base  
> self.site = "[http://ws.geonames.org/findNearestAddress?lat=:lat&lng=:long](http://ws.geonames.org/findNearestAddress?lat=:lat&lng=:long)  
> [http://ws.geonames.org/findNearestAddress?lat=:lat&amp;lng=:long](http://ws.geonames.org/findNearestAddress?lat=:lat&amp;lng=:long) "  
> end

jeremy
