Rails 3.1 and PostgreSQL, “Please install the Postgres adapter” hell

I just lost an hour with this error:

1
Please install the postgres adapter: `gem install activerecord-postgres-adapter` (cannot load such file -- active_record/connection_adapters/postgres_adapter) (RuntimeError)

I had to google a lot until I found the answer here, on Matt’s blog: “Please install the postgres adapter”

As usual, it was a stupid mistake in the database.yml:

1
2
3
4
5
development:
  adapter: postgres
  database: ombu_development
  pool: 5
  timeout: 5000

The adapter is called “postgresql” not “postgres

1
2
3
4
5
development:
  adapter: postgresql
  database: ombu_development
  pool: 5
  timeout: 5000

I hope this saves you time.

Posted in Uncategorized | Leave a comment

Yet another good reason to keep a gemset per project

I love rvm. It lets you keep your gems organized per project. The combination of .rvmrc and gemset is great for keeping things organized.

Yet another good reason is performance! (From @tenderlove’s blog post)

So, if you still keep all your gems in ‘system’, you should seriously consider switching to rvm gemsets per project.

Posted in open source, programming, Ruby programming, software engineering | Tagged , , , , , | Leave a comment

Pusher: Presence channels are private channels

Channels prefixed with ‘presence-’ don’t need to be also prefixed with ‘private-’

From the Pusher docs:

Presence channels build on the security of Private channels and expose the additional feature of an awareness of who is subscribed to that channel. 

So, don’t bother adding the ‘private-’ prefix to a ‘presence-’ prefixed channel because it will be a waste of time.

Posted in developer tools, programming, web programming | Tagged , , , , | Leave a comment