Every time I generate a rails app I have to type the -d postgresql
would be nice if we could just use postgres as the default database.
Every time I generate a rails app I have to type the -d postgresql
would be nice if we could just use postgres as the default database.
I think the default database is sqlite because it is already in almost every operational system out there.
I also think we should not change this default because I know there are people that prefer to use mysql as the default database. Other people prefer to use oracle as the default database.
So, since would be hard to please everyone, I think we should keep the original default.
Rails switched from MySQL to SQLite to improve the on boarding experience. The original announcement has more details.
sqlite is the best possible default in my opinion. As RafaelFranca pointed out if you the gem to your project you no need to install anything else so you are ready to go. It makes very simple to start with rails or even if you are a rails expert and you want to try out something, track down a bug etc you don’t need to worry about a running mysql, postgres, oracle, mongo etc instance.
As alternative you can change your defaults adding -d postgresql to the .railsrc file in your HOME dir.
More info about this: http://natashatherobot.com/how-to-configure-your-rails-defaults/
ah thank you thats really nice!