Ruby-on-rails – How to configure Ruby on Rails with no database

ruby-on-rails

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

Best Solution

For Rails 3 and Rails 4:

Use -O(Capital 'O') or --skip-activerecord option to generate an application without a database.

rails new myApp -O

or

rails new myApp --skip-activerecord

This Answer is reshared from here


For Rails 5:

Use --skip-active-record option to generate an application without a database

Notice the extra hyphen '-' as opposed to previous Rails versions.

rails new myApp --skip-active-record