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

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

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

jeremy

···

On Nov 20, 2005, at 7:33 PM, Horacio Sanson 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?

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

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 Jackson さんは書きました:

···

>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

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

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 Fugal さんは書きました:

···

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

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

Anyway.

···

On 11/21/05, Horacio Sanson <hsanson@moegi.waseda.jp> 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.

Horacio

Tuesday 22 November 2005 03:52、Hans Fugal さんは書きました:
> 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

Horacio Sanson 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

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:

···

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

On 11/21/05, Horacio Sanson <hsanson@moegi.waseda.jp> 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.
>
> Horacio
>
> Tuesday 22 November 2005 03:52、Hans Fugal さんは書きました:
> > 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

Jacob Quinn Shenker 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

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 Nov 21, 2005, at 5:30 PM, James Britt wrote:

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

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 Monday 21 November 2005 19:33, James Britt wrote:

Jacob Quinn Shenker 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 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

···

On 11/22/05, Stephen Waits <steve@waits.net> wrote: