Forum: Ruby on Rails ActiveRecord without database

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.
4f4122bc3b9999d9050f0b1a10b63251?d=identicon&s=25 Andrea Reginato (reis)
on 2006-01-30 10:08
The question is this.
Can I use ActiveRecord without the presence of a database?
I use only YAML file for my project and I would like use the power of
ActiveRecord for my models. I have not tested and so I ask you if this
is possible.

Thanks so much.
--Reis
Ab14c50a93717a5bfd342496317975c4?d=identicon&s=25 Arie Kusuma Atmaja (Guest)
on 2006-01-30 10:35
(Received via mailing list)
http://wiki.rubyonrails.org/rails/pages/HowToUseVa...
http://www.realityforge.org/articles/2005/12/02/va...

On 1/30/06, Andrea Reginato <andrea.reginato@gmail.com> wrote:
> The question is this.
> Can I use ActiveRecord without the presence of a database?
> I use only YAML file for my project and I would like use the power of
> ActiveRecord for my models. I have not tested and so I ask you if this
> is possible.

--
kind_regards = {
  :name  => "Arie",
  :Y!    => "riyari3",
  :email => "ariekusumaatmaja@gmail.com"
}
4f4122bc3b9999d9050f0b1a10b63251?d=identicon&s=25 Andrea Reginato (reis)
on 2006-01-30 11:41
Arie Kusuma Atmaja wrote:
> http://wiki.rubyonrails.org/rails/pages/HowToUseVa...
> 
http://www.realityforge.org/articles/2005/12/02/va...
>

Thanks soo much for the link.
--Reis
132a94ca65959bda6c74fae54bff2425?d=identicon&s=25 Ezra Zygmuntowicz (Guest)
on 2006-01-30 18:28
(Received via mailing list)
On Jan 30, 2006, at 1:08 AM, Andrea Reginato wrote:

> The question is this.
> Can I use ActiveRecord without the presence of a database?
> I use only YAML file for my project and I would like use the power of
> ActiveRecord for my models. I have not tested and so I ask you if this
> is possible.
>
> Thanks so much.
> --Reis
>
> --

You can easily use rails without using ActiveRecord for the models.
If you just want to use yaml as your models then you are already
there you can eaily just load yaml into hashes or arrays and use them
in the views or wherever. But If you want database type relationships
you will need to use AR or maybe you want to look at kirbybase, a
pure ruby database that is nice and powerfull and uses ruby blocks as
its query language. Kirbybase stores its database in a plain text
file but has indexes so its still very fast.

	But alas, the power of rails is closely tied to ActiveRecord and I
think that you will be swimming upstream without it once things get
complicated. Can you elaborate on what you want to do that doesn't
need a database but needs to store in yaml files?

Cheers

-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
ezra@yakima-herald.com
This topic is locked and can not be replied to.