2

Had a simple heroku app with sequel and postgres. However, I got:

% heroku rake db:migrate
rake aborted!
LoadError: no such file to load -- sequel/adapters/postgresql
/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.23.0/lib/sequel/core.rb:249:in `require'

There is no postgresql.rb in the sequel-3.23.0/lib/sequel/adapters/ There is a postgres.rb on my local drive. I'm using the free plan.

% heroku info
...
Dynos:          1
Workers:        0
Repo size:      9M
Slug size:      8M
Stack:          bamboo-mri-1.9.2
Data size:      (empty)
Addons:         Basic Logging, Shared Database 5MB


% heroku pg:info
=== kampanchi database SHARED_DATABASE_URL
1
  • Is there a question in here? If you use the "wrong" name for postgresql, does it work? Commented May 24, 2011 at 22:03

2 Answers 2

4

Sequel has always used "postgres" for the postgres adapter. If you have specified "postgresql" as the adapter scheme, then it shouldn't work. If you are using Rails, Heroku creates a database.yml file in ActiveRecord format (using "postgresql"), and I'm guessing that's what your rake task is picking up. If you are using a Rails/Sequel integration tool, I'm guessing it isn't handling that conversion for you, and it should be fixed. Personally, I'd manually set up the database connection using the DATABASE_URL environment variable that Heroku provides.

See http://devcenter.heroku.com/articles/database#database_urls for details.

Sign up to request clarification or add additional context in comments.

Comments

0

Just to supplement Jeremy's response, Heroku has always used "postgres" in the DATABASE_URL. If you connect to ENV["DATABASE_URL"], it should work regardless of what your database is.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.