Ruby on Rails
This is my opinionated guide to Rails.
--no-coffee to ~/.railsrc and you never have to deal with CoffeeScript ever again.
Postgres. Just use Postgres. In Rails-land, you've basically got four choices: SQLite, MySQL, Postgres or some NoSQL thing. I'm not wild about the NoSQL thing given they usually don't have any type checking... and I like type checking.
MySQL we can get rid of from the list: you can use MariaDB if you like, but Postgres is pretty much just better than MySQL or MariaDB. Postgres gives you nice things like GIS functionality, full-text search, crazy mad stuff like foreign key constraints (
gem install foreigner).
SQLite isn't much use for anything beyond testing. And you should test with the same database you are going to use in production... because otherwise the differences in the type system (or the complete lack of type enforcement by SQLite rather) will bite you, as will the lack of features.
Postgres is just awesome. Use it. And turn on HStore and arrays.
HStore and testing
If you are using HStore, Postgres' excellent key-value-in-column store, you'll need to enable it for your test database too. But, the test database gets created when you run the tests and torn down afterwards. So you need to set your local Postgres to create new databases with HStore enabled by default.
One very simple pattern I like: dependency testing. Create an integration test called "dependencies test". In here, every external module you use, write a test for. This may just be as simple as
assert Foo::Bar.class != nil, "foo isn't loading"
You can now know quickly what hasn't installed properly.
Ah, but what about Gemfiles?
That's fine... but Gems sometimes have native dependencies. And sometimes the author doesn't specify the native dependency. Or the native dependency is broken. Or you are running it on JRuby and the FFI is broken. Or RubyGems reckons you've got it, but some prat went through and removed the files from the file system by hand... or a hundred other reasons. You don't have to test whether the code does anything particularly interesting (the library itself should ideally have a test suite). But if you call import and it doesn't load the module of code that you expected, you have a problem with your deployment that will affect your application...
Phusion Passenger with Nginx. Or Apache if absolutely necessary. Nginx is nicer.