Active Record without rails

I read somewhere in this list (or so I belive since I can’t find the
post)
that it is possible to use the powerful ActiveRecord class of Rails
without
rails…

I have my little script that access a database (MS SQL) and I have seen
what
rails ActiveRecord can do but this is not a web app, a simple script
that
reads/writes records in a database. I want ActiveRecord to make my life
easier managing these records.

I have searched around but I can’t find a how to on how to use
ActiveRecord
without rails. Is there any howto or example code around?

any resources are welcome,

thanks
Horacio

I have my little script that access a database (MS SQL) and I have seen what
rails ActiveRecord can do but this is not a web app, a simple script that
reads/writes records in a database. I want ActiveRecord to make my life
easier managing these records.

I have searched around but I can’t find a how to on how to use ActiveRecord
without rails. Is there any howto or example code around?

You might also want to check out Og which has similar goals to
ActiveRecord

Kev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 20, 2005, at 7:33 PM, Horacio S. wrote:

I have searched around but I can’t find a how to on how to use
ActiveRecord
without rails. Is there any howto or example code around?

http://wiki.rubyonrails.com/rails/pages/HowToUseActiveRecordOutsideRails

Please take further discussion to the Rails mailing list. Thanks!

jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDgURhAQHALep9HFYRAvF+AKDE58lc82GBlkxw1ui64Sxqh+0q5gCfSpr/
Te3WUdDQgGoA/mAGj42GRrA=
=Snnj
-----END PGP SIGNATURE-----

Thanks a lot.

I looked around Og but the documentation left me a lot of questions, I
got my
hands on the Rails Book and suddenly all my questions about ActiveRecord
got
answered (starting on page 199 : )).

Now I am in the process of migrating all my DBI code to ActiveRecord.

thanks again,
Horacio

Monday 21 November 2005 12:53ã?Kev J. ã?ã??はæ?¸ãã¾ã?ã?:

this is a ‘without rails’ post so I thought the best place to ask was
here, I
just needed an ORM solution for my ruby programs and the answers I got
gave
me Og and AR I really did not want to subscribe to two more mailing
lists
just for one question. My apologies if was wrong.

Horacio

Tuesday 22 November 2005 03:52ã?Hans F. ã?ã??はæ?¸ãã¾ã?ã?:

With all due respect, talking about AR outside of rails belongs off the
rails mailing list, where people who are interested in doing the same
thing in the future can find it.

Incidentally I have done this and also found the rails book very
helpful, as well as http://ar.rubyonrails.com

On Monday 21 November 2005 19:16, Jacob Quinn S. wrote:

I could have sworn someone asked on ruby-talk about AR without Rails,
and was sent here…

Anyway.

It’s a grey area. You could just post the other mailing list sending
you over
to both groups and eventually get someone who helps you out. :slight_smile:

I could have sworn someone asked on ruby-talk about AR without Rails,
and was sent here…

Anyway.

Jacob Quinn S. wrote:

I could have sworn someone asked on ruby-talk about AR without Rails,
and was sent here…

Perhaps he was considered a blasphemous heathen, and banished.

James

On Monday 21 November 2005 19:33, James B. wrote:

Jacob Quinn S. wrote:

I could have sworn someone asked on ruby-talk about AR without Rails,
and was sent here…

Perhaps he was considered a blasphemous heathen, and banished.

I’ve never used rails (save 5 minutes dinking around with ActionMailer,
and
that’s it) so I have no clue. I know it’s annoying, but it’s not really
that
hard to hit the delete key.

On Nov 21, 2005, at 5:30 PM, James B. wrote:

I’d prefer not to see Rails-specific queries on this list

I 100% agree; however, in this case, it has (almost) nothing to do
with Rails. It’s certainly On

Let’s agree to tread lightly in our policing and continue to refer
only the most obvious Off Topic posters to other lists.

–Steve

On 11/22/05, Stephen W. [email protected] wrote:

I 100% agree; however, in this case, it has (almost) nothing to do
with Rails. It’s certainly On

I agree this post was on-topic for ruby-talk.

Let’s agree to tread lightly in our policing and continue to refer
only the most obvious Off Topic posters to other lists.

In my opinion it isn’t a matter of considering Rails-specific posts
off-topic, it is just the fact that the Rails list has loads more
people with very Rails-specific knowledge and skills, whereas
ruby-talk has more general Ruby knowledge. The Rails list guys can
answer those funky Rails-specific questions in two minutes (because
they have probably seen that question 100 times, in the same way we on
ruby-talk see the same sorts of questions frequently.) But if we tried
to answer the same question on ruby-talk it might take much longer. So
it is really just about time management, for all parties involved: the
person asking the question gets their answer quicker, no one here has
to spend excess time finding the answer, and the ruby-talk readership
doesn’t have another Rails thread to read through.

When other new Ruby frameworks (both existing and those yet to be
created) gain more popularity, we may find ourselves pointing to other
lists as well (e.g. “you’ll get a better answer on the Nitro mailing
list.”) As a long-time Ruby evangelist, this makes me happy.

Ryan

Horacio S. wrote:

this is a ‘without rails’ post so I thought the best place to ask was here, I
just needed an ORM solution for my ruby programs and the answers I got gave
me Og and AR I really did not want to subscribe to two more mailing lists
just for one question. My apologies if was wrong.

While I readily understand why it happens, I’d prefer not to see
Rails-specific queries on this list (especially those that seem to
presume that everyone “just knows”, for example, what “params” is
supposed to be, or what their code snippet is supposed to do), but
general questions about particular libraries are fine by me.

People should be encouraged to consider that one can often get the most
out of Ruby by selecting appropriate libraries and writing your own
code, rather than settle for prepackaged one-stop-shopping assemblages.

Learn more Ruby that way, at least.

James

http://www.ruby-doc.org - Ruby Help & Documentation
Ruby Code & Style - Ruby Code & Style: Writers wanted
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
http://www.30secondrule.com - Building Better Tools