Active Record without rails

Discussion in 'Ruby' started by Horacio Sanson, Nov 21, 2005.

  1. 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
     
    Horacio Sanson, Nov 21, 2005
    #1
    1. Advertising

  2. -----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/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-----
     
    Jeremy Kemper, Nov 21, 2005
    #2
    1. Advertising

  3. Horacio Sanson

    Kev Jackson Guest


    >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
     
    Kev Jackson, Nov 21, 2005
    #3
  4. Thanks a lot.

    I looked around Og but the documentation left me a lot of questions, I got=
    my=20
    hands on the Rails Book and suddenly all my questions about ActiveRecord go=
    t=20
    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=E3=80=81Kev Jackson =E3=81=95=E3=82=93=E3=81=
    =AF=E6=9B=B8=E3=81=8D=E3=81=BE=E3=81=97=E3=81=9F:
    > >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 scri=

    pt
    > > 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 ActiveReco=

    rd
    >
    > Kev
     
    Horacio Sanson, Nov 21, 2005
    #4
  5. Horacio Sanson

    Hans Fugal Guest

    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
     
    Hans Fugal, Nov 21, 2005
    #5
  6. this is a 'without rails' post so I thought the best place to ask was here,=
    I=20
    just needed an ORM solution for my ruby programs and the answers I got gav=
    e=20
    me Og and AR I really did not want to subscribe to two more mailing lists=20
    just for one question. My apologies if was wrong.

    Horacio

    Tuesday 22 November 2005 03:52=E3=80=81Hans Fugal =E3=81=95=E3=82=93=E3=81=
    =AF=E6=9B=B8=E3=81=8D=E3=81=BE=E3=81=97=E3=81=9F:
    > 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, Nov 22, 2005
    #6
  7. SSBjb3VsZCBoYXZlIHN3b3JuIHNvbWVvbmUgYXNrZWQgb24gcnVieS10YWxrIGFib3V0IEFSIHdp
    dGhvdXQgUmFpbHMsCmFuZCB3YXMgc2VudCBoZXJlLi4uCgpBbnl3YXkuCgpPbiAxMS8yMS8wNSwg
    SG9yYWNpbyBTYW5zb24gPGhzYW5zb25AbW9lZ2kud2FzZWRhLmpwPiB3cm90ZToKPgo+IHRoaXMg
    aXMgYSAnd2l0aG91dCByYWlscycgcG9zdCBzbyBJIHRob3VnaHQgdGhlIGJlc3QgcGxhY2UgdG8g
    YXNrIHdhcyBoZXJlLCBJCj4ganVzdCBuZWVkZWQgYW4gT1JNIHNvbHV0aW9uIGZvciBteSAgcnVi
    eSBwcm9ncmFtcyBhbmQgdGhlIGFuc3dlcnMgSSBnb3QgZ2F2ZQo+IG1lIE9nIGFuZCBBUiBJIHJl
    YWxseSBkaWQgbm90IHdhbnQgdG8gc3Vic2NyaWJlIHRvIHR3byBtb3JlIG1haWxpbmcgbGlzdHMK
    PiBqdXN0IGZvciBvbmUgcXVlc3Rpb24uIE15IGFwb2xvZ2llcyBpZiB3YXMgd3JvbmcuCj4KPiBI
    b3JhY2lvCj4KPiBUdWVzZGF5IDIyIE5vdmVtYmVyIDIwMDUgMDM6NTLjgIFIYW5zIEZ1Z2FsIOOB
    leOCk+OBr+abuOOBjeOBvuOBl+OBnzoKPiA+IFdpdGggYWxsIGR1ZSByZXNwZWN0LCB0YWxraW5n
    IGFib3V0IEFSIG91dHNpZGUgb2YgcmFpbHMgYmVsb25ncyBvZmYgdGhlCj4gPiByYWlscyBtYWls
    aW5nIGxpc3QsIHdoZXJlIHBlb3BsZSB3aG8gYXJlIGludGVyZXN0ZWQgaW4gZG9pbmcgdGhlIHNh
    bWUKPiA+IHRoaW5nIGluIHRoZSBmdXR1cmUgY2FuIGZpbmQgaXQuCj4gPgo+ID4gSW5jaWRlbnRh
    bGx5IEkgaGF2ZSBkb25lIHRoaXMgYW5kIGFsc28gZm91bmQgdGhlIHJhaWxzIGJvb2sgdmVyeQo+
    ID4gaGVscGZ1bCwgYXMgd2VsbCBhcyBodHRwOi8vYXIucnVieW9ucmFpbHMuY29tCj4KPgo=
     
    Jacob Quinn Shenker, Nov 22, 2005
    #7
  8. Horacio Sanson

    Kevin Brown Guest

    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 o=
    ver=20
    to both groups and eventually get someone who helps you out. :)

    > On 11/21/05, 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 answe=

    rs
    > > 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=E3=80=81Hans Fugal =E3=81=95=E3=82=93=E3=

    =81=AF=E6=9B=B8=E3=81=8D=E3=81=BE=E3=81=97=E3=81=9F:
    > > > With all due respect, talking about AR outside of rails belongs off t=

    he
    > > > 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
     
    Kevin Brown, Nov 22, 2005
    #8
  9. Horacio Sanson

    James Britt Guest

    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
     
    James Britt, Nov 22, 2005
    #9
  10. Horacio Sanson

    James Britt Guest

    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
     
    James Britt, Nov 22, 2005
    #10
  11. Horacio Sanson

    Kevin Brown Guest

    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.
     
    Kevin Brown, Nov 22, 2005
    #11
  12. 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
     
    Stephen Waits, Nov 22, 2005
    #12
  13. On 11/22/05, Stephen Waits <> 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
     
    Ryan Leavengood, Nov 22, 2005
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Heinemeier Hansson
    Replies:
    2
    Views:
    193
    Michael Neumann
    May 31, 2004
  2. David Heinemeier Hansson
    Replies:
    0
    Views:
    157
    David Heinemeier Hansson
    Aug 1, 2004
  3. David Heinemeier Hansson
    Replies:
    3
    Views:
    185
    Mauricio Fernández
    Aug 6, 2004
  4. David Heinemeier Hansson
    Replies:
    0
    Views:
    287
    David Heinemeier Hansson
    Sep 5, 2004
  5. Xeno Campanoli
    Replies:
    1
    Views:
    149
    Xeno Campanoli
    Jul 18, 2008
Loading...

Share This Page