On Thursday, February 15, 2018 at 1:52:12 PM UTC-8, Elanor Riley wrote:
>
> I'm in the process of converting one of my apps from using Mysql to using
> Postgres so that it can be hosted on heroku but I'm getting an error that
> the postgres adapter is not found for sequel. I have all the required gems
> installed I believe.
>
> Here's the relevant excerpt from Gemfile and config, etc.
>
> Gem File:
> # Databases
> gem 'sequel'
> gem 'sequel_enum'
> gem 'pg'
> gem 'sequel_pg', :require=>'sequel'
>
> Have completed *bundle install* and everything installs just fine.
>
> Database config:
>
> default_params = {
> :database => ENV['DATABASE_DB'], #development-db
> :host => ENV['DATABASE_HOST'], #localhost
> :user => ENV['DATABASE_USER'], #postgres
> :password => ENV['DATABASE_PASS'], #password
> :adapter => ENV['DATABASE_ADAPTER'], #postgres
> :reconnect => true
> }
>
> Sequel.connect(default_params, :loggers => [logger])
>
> When I try to do a migration or start my app I get this error:
>
> ERROR - Sequel::AdapterNotFound - LoadError: LoadError:
>
> /home/eriley/.rvm/gems/ruby-2.2.1/gems/sequel-4.31.0/lib/sequel/adapters/postgres.rb:9:in
>
> `<top (required)>'
> /home/eriley/.rvm/gems/ruby-2.2.1/gems/sequel-4.31.0/lib/sequel/adapters/postgres.rb:9:in
>
> `<top (required)>': LoadError: LoadError (Sequel::AdapterNotFound)
>
> What am I missing here?
>
pg 1.0.0 dropped backwards compatibility with older versions of pg. Either
use an older version of pg, or a newer version of Sequel. Sequel 4.31.0
was released over two years ago, you should probably upgrade to the latest
version.
Thanks,
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.