Tag Archives: rails

I decided to do a full install of OS X when Yosemite came out and that included installing Ruby and Ruby on Rails on my machine again. Over the last couple of years, I’ve switched from rvm to rbenv because it is a lighter weight solution. Here are the steps that I take to install Ruby on Rails on OS X today

Related posts:

I got myself a Macbook Air today to primarily be a development machine. For those of you who are looking for a shortcut, check out RailsInstaller that does a quick job as well. Personally, I just wanted to give a shot of installing Rails from scratch because it’s a good way of really understanding your system and the appropriate pre-requisites to run Rails. Also, it allows you to specify what version of Rails and ruby you want installed on your system.

Related posts:

The operations that I most commonly use are db:create, db:migrate and db:reset. I was working with someone and found db:schema:load. I was pleasantly surprised when I came across this list of operations on Stack Overflow.

db:create creates the database for the current env

db:create:all creates the databases for all envs

db:drop drops the database for the current env

db:drop:all drops the databases for all envs

db:migrate runs migrations for the current env that have not run yet

db:migrate:up runs one specific migration

db:migrate:down rolls back one specific migration

db:migrate:status shows current migration status

db:migrate:rollback rolls back the last migration

db:forward advances the current schema version to the next one

db:seed (only) runs the db/seed.rb file

db:schema:load loads the schema into the current env’s database

db:schema:dump dumps the current env’s schema (and seems to create the db as well)