3
votes

I'm looking for any pointers on how to write a rails web app without ActiveRecord.

A doc or an example of a (not too complex) web app using storage backends other than a relational database would be greatly appreciated.

It's not clear on what should be implemented in the model classes in order to make the rails app work without the ActiveRecord layer.

Thanks,

2
Just curious...are you doing this for any particular reason?Robert S.
Of course, I hava a web app to develop but there is no relational db backend ...devlearn
Yes, turns out I misread your question. Thanks for the double clarification. :)Robert S.

2 Answers

4
votes

Of course it's possible, here, for example, MongoMapper is used instead of ActiveRecord:

http://railstips.org/blog/archives/2009/07/23/getting-started-with-mongomapper-and-rails/

2
votes

Note that this will seem a lot easier with Rails 3. Rails team spent a lot of efforts on ORM agnosticism when pushing to beta. They've created a public API (ActiveModel) for different ORMs to implement, so that an ORM can serve as a drop-in replacement for ActiveRecord. That way you'll just be able to define models in terms of your ORM without any extra efforts.

DataMapper already has an implementation of ActiveModel in dm-rails, and there'll be more to come.

See this post by Yehuda Katz for details.