views:

1289

answers:

2

It would be convenient to use Ruby on Rails for a small website project that has no current need for a database. I know I could create an empty database in MySQL and go from there, but does anyone know a better way to run Rails without a database?

Thanks,

  • Rob
+5  A: 

Uncomment this line in the environment.rb

config.frameworks -= [ :active_record, :active_resource, :action_mailer]

typemismatch
Thanks. This seems to be the simplest way to exclude the unnecessary active record code.
RobbieCanuck
+4  A: 

If you don't need a database then you probably don't need to have the bulk of Rails. You may want a smaller more customizable framework to work with.

Sinatra is a tiny framework that is great for serving up basic static pages.

But if you insist on using Rails here is an article that will show you how to do just that or here.

vrish88
Thanks - both of these links refer to the Rails Recipes book and contain steps to get testing working with a database-less rails application.I was being lazy and hoped to leverage the rails infrastructure already on the server for other apps, but Sintatra looks intriguing.
RobbieCanuck
+1 for Sinatra, that's exactly what I was looking for
Jacob Stanley