On Jan 30, 2006, at 1:08 AM, Andrea R. 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
Thanks so much.
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?