Run Ruby on Rails without a database
As new to RoR, I was starting learning things on my own with some simple applications built on ruby on rails. On every step, right from installing ruby on rails to using it, I was learning something or the other and using which I was resolving issues. But the cost I’d to pay is the amount of time and effort to google around and find the right way to resolve issues. The reason being, there are more than one solution for any problem that I looked for and in most cases, only one of them seemed to be working for me. So even though the answers are all spread across the internet, I decided to blog about the same to ensure that I get back to them without much of research involved in the future.
One of the current requirement is how to run a simple RoR application without a database or how to disable the database configuration on ruby on rails.After some search, the solution that worked for me turned out to be simple and straight forward.
All that you need to do is go to ‘my_application/config‘ folder and edit ‘environment.rb‘ file.
Look for the following commented lines.
# Skip frameworks you’re not going to use. To use Rails without a database,
# you must remove the Active Record framework.
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
Just uncomment the following line and save the changes.
config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
Do not forget to restart WEBrick.
About this entry
You’re currently reading “Run Ruby on Rails without a database,” an entry on Flashes of Insight
- May 1, 2010 / 5:28 am