content top

Sinatra, Sqlite, Postgres, Heroku

Recently I ran into an issue trying to deploy to the Heroku Cedar stack for my (in progress) app, Mocknote. I developed the app locally with Sqlite3, using Sinatra and DataMapper.
Heroku complained about my Gemfile.lock missing the dm-postgres-adapter, but I was unable to install the gem locally. I resolved this conundrum by adding this to my Gemfile:


group :production do
gem 'dm-postgres-adapter'
end

I then ran this:

bundle install --without production

I was then able to successfully deploy to Heroku.

Read More

Unix tree command on Mac OSX

The tree command is, sadly, missing from Mac OSX – but here’s a quick and dirty way to replicate it on OSX. You could of course use MacVIm and NERDTree, but where’s the fun in that?

find . -print | sed -e ‘s;[^/]*/;|____;g;s;____|; |;g’

Read More

Rails Beginner: Mac OSX, Macports, RVM, MySQL 5.1 – Y U No Work?

Just for the sake of remembering:
After installing MySQL via Macports (which installs mySQL to a different place than you’d expect), install the MySQL gem with:

sudo env ARCHFLAGS=”-arch i386″ gem install mysql — –with-mysql-config=/opt/local/bin/mysql_config5

I finally remembered after I found my bookmark for Mark Turner (amerine.net)’s post on installing Rails 3/Ruby 1.9.2.

Read More
content top