Forum: Ruby Active Record without rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
81cf8dab4b4af8aa3148c28421afd845?d=identicon&s=25 hsanson (Guest)
on 2005-11-21 04:33
(Received via mailing list)
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
24d2f8804e6bb4b7ea6bd11e0a586470?d=identicon&s=25 jeremy (Guest)
on 2005-11-21 04:54
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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?

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

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-----
2a0f7bd2c54fbc44329d69555b96f1c5?d=identicon&s=25 kevin.jackson (Guest)
on 2005-11-21 04:54
(Received via mailing list)
>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
81cf8dab4b4af8aa3148c28421afd845?d=identicon&s=25 hsanson (Guest)
on 2005-11-21 13:34
(Received via mailing list)
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 ã?ã??はæ?¸ãã¾ã?ã?:
D2bc07ef3dd6e18824932ce55b1f5571?d=identicon&s=25 fugalh (Guest)
on 2005-11-21 19:53
(Received via mailing list)
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
81cf8dab4b4af8aa3148c28421afd845?d=identicon&s=25 hsanson (Guest)
on 2005-11-22 02:04
(Received via mailing list)
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 ã?ã??はæ?¸ãã¾ã?ã?:
Dfc2a545a0c4f542d69f89a782714e8e?d=identicon&s=25 jqshenker (Guest)
on 2005-11-22 02:20
(Received via mailing list)
I could have sworn someone asked on ruby-talk about AR without Rails,
and was sent here...

Anyway.
Fee23d1fc58edee59e05d7a52dcf172e?d=identicon&s=25 blargity (Guest)
on 2005-11-22 02:32
(Received via mailing list)
On Monday 21 November 2005 19:16, Jacob Quinn Shenker 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. :-)
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 james_b (Guest)
on 2005-11-22 02:32
(Received via mailing list)
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
http://www.artima.com/rubycs/ - 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
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 james_b (Guest)
on 2005-11-22 02:36
(Received via mailing list)
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
Fee23d1fc58edee59e05d7a52dcf172e?d=identicon&s=25 blargity (Guest)
on 2005-11-22 03:04
(Received via mailing list)
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'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.
280b41a88665fd8c699e83a9a25ef949?d=identicon&s=25 steve (Guest)
on 2005-11-22 08:02
(Received via mailing list)
On Nov 21, 2005, at 5:30 PM, James Britt 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
4b174722d1b1a4bbd9672e1ab50c30a9?d=identicon&s=25 leavengood (Guest)
on 2005-11-22 17:10
(Received via mailing list)
On 11/22/05, Stephen Waits <steve@waits.net> 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
This topic is locked and can not be replied to.