Skip to content

Instantly share code, notes, and snippets.


Alex Aguilar alexagui

View GitHub Profile
alexagui /
Created Jun 29, 2012
Migrate a Rails project to Postgresql with and Induction

I had issues installing Postgres with the instructions in this Railscast. However I was able to get postgres running on my project with and (Hat tip to this stackoverflow thread).

  1. Download & install (documentation) Make sure to install in /Applications.
  2. Update your PATH
    In my case I added the following to ~/.bash_profile
    export PATH="/Applications/$PATH"
    Check that is being loaded
$ which psql
alexagui /
Created Jun 16, 2012 — forked from croaky/
Typical README for a thoughtbot Rails app that is deployed to Heroku

Rails app

is a Rails 3.1 app running on Ruby 1.9.2 and deployed to Heroku's Cedar stack. It has an RSpec and Cucumber test suite which should be run before commiting to the master branch.

Running tests

Create aliases:

alexagui /
Created Jun 16, 2012 — forked from jaymcgavren/
A Code TV screencast on getting started with Heroku


Heroku is a simple way to publish your Rails app, and a powerful platform that will allow it to scale. In this episode, Jay McGavren gets you started with your first Heroku app.

Set up your Rails app

Isolate your gem environment

  • You WANT Rails to fail locally if a gem isn't in your Gemfile

launchy and guard-rspec are mentioned but they're not in the Gemfile


Though it's later explained that Factory() is a shortcut for Factory.create(). The section below might read more clearly with explicit calls to create()

Can you guess the difference? Factory.create() builds the model and saves it, while 
instantiates a new model, but doesn’t save it. If we used Factory.create() in this example it would break 
alexagui / ruby_debug_pow.markdown
Created Jul 22, 2011
How to Ruby Debug with Pow
View ruby_debug_pow.markdown
View debugger.markdown

Ruby Debugger

Most of the time simple output statements using warn, raise, or a logger will help you find your issue. But sometimes you need the big guns, and that means ruby-debug.


The ruby-debug package has had some rocky times during the transition from Ruby 1.8.7 to 1.9.2 and beyond. But now, finally, the debugger is reliable and usable.


You can’t perform that action at this time.