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?
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
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
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.
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.
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.