What's the simplest way to use ActiveResource in ruby (without rails)?

I would like to use this class in a standalone project, but I have
been unsuccessful thus far.
Also, how does this class exactly communicate with the web server?
Thank you.

class Person < ActiveResource::Base
self.site = “http://localhost:3000/
end

skarayan wrote:

I would like to use this class in a standalone project, but I have
been unsuccessful thus far.
Also, how does this class exactly communicate with the web server?
Thank you.

class Person < ActiveResource::Base
self.site = “http://localhost:3000/
end

Look at the docs: http://api.rubyonrails.org/

and specifically: ActiveRecord::Base.establish_connection()

ActiveRecord::Base.establish_connection(
:adapter => “mysql”,
:host => “localhost”,
:username => “myuser”,
:password => “mypass”,
:database => “somedatabase”
)

hth

ilan

Thank you for the response, but I am looking for ActiveResource and
not ActiveRecord.
ActiveResource is the REST component of Rails.

On Oct 29, 3:29 pm, Ilan B. [email protected]