Despite all other options, I decided to write a small project in Rails. But, this project is so small, there is really no need to store any information in a database!
Now, with Rails 2.0, it’s easy to accomplish!
The only real thing you have to do is add this line to your config/environment.rb:
config.frameworks -= [ :active_record ]
Cake!
I tend to remove the database.yml file, just to remind myself I’m not using a database!
3 comments ↓
Great tip. Have you checked out Merb? When I wanted a non-db framework ruby application, Merb worked well and was faster than my Rails implementation. Of course you can turn on an ORM such as ActiveRecord, DataMapper, or Sequel.
Ben,
I have, in fact! I’ve done a lot of work with merb and even Sinatra, but for this particular application, I felt that rails was the best option. Of course, there is something to be said for choosing the right tool at the right time!
Great tip Ben! Thanks!
Thanks for the tip,
But There is an uninitiaiized constant error when clicking AT FIRST on the
‘About your application’s environment’ link in the ‘Welcome aboard’ page. I think this is a Rails error to be fixed. Otherwise, It seems OK.
Webserver: Webrick
error code: NameError (uninitialized constant ActiveRecord::Base)
Leave a Comment