Skip to main content

Ruby

Dev meeting logs are stored in GitHub.

Time Zones

(Sourced from Thoughtbot)

Do not use the following:

* Time.now
* Date.today
* Date.today.to_time
* Time.parse("2015-07-04 17:05:37")
* Time.strptime(string, "%Y-%m-%dT%H:%M:%S%z")

Use the following instead:

* Time.current
* 2.hours.ago
* Time.zone.today
* Date.current
* 1.day.from_now
* Time.zone.parse("2015-07-04 17:05:37")
* Time.strptime(string, "%Y-%m-%dT%H:%M:%S%z").in_time_zone

Installing pq gem on Mac OS X

The Postgres gem requires the postgresql Homebrew package to be installed; the command pg_config is requried to compile the pg gem.

# Install dependencies
brew install [email protected]

# Run one of the following depending on how you are installing the gem
bundle # The preferred way
gem install pq