ruby on rails - Sequel not working with postgres -


i'm trying migrate rails apps postgresql in order work in same environnement on heroku...

i installed postgres, pg, , postgres-pr fine on mac can't taps pull databases off heroku postgresql server.

my rails apps connect seamlessly database.

when run irb get:

>> require "rubygems" => false >> require "sequel" => true >> db = sequel.postgres nameerror: uninitialized constant sequel::postgres::pgerror     /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/adapters/postgres.rb:89     /library/ruby/site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'     /library/ruby/site/1.8/rubygems/custom_require.rb:31:in `k_require'     /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:249:in `tsk_require'     /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:72:in `check_requiring_thread'     /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:69:in `synchronize'     /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:69:in `check_requiring_thread'     /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:249:in `tsk_require'     /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/database/connecting.rb:25:in `adapter_class'     /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/database/connecting.rb:63:in `connect'     /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:119:in `connect'     /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:282:in `adapter_method'     /library/ruby/gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:289:in `postgres'     (irb):3 >>  

i don't understand what's going wrong.

does have idea?


this jeremy

bigmac:~ jp$ ruby -rubygems -rpg -e "p pgerror" ruby: no such file load -- pg (loaderror) bigmac:~ jp$ ruby -rubygems -rpostgres -e "p pgerror" ruby: no such file load -- postgres (loaderror) 

i'm not sure understand mean "check pg.rb or postgres.rb somewhere in path"

should scan directories in $path , unwanted pg.rb or postgres.rb file?


that's weird because did install pg , postgre

here ran

bigmac:/ jp$ sudo gem install pg password: building native extensions.  take while... installed pg-0.10.0 1 gem installed installing ri documentation pg-0.10.0... installing rdoc documentation pg-0.10.0... bigmac:/ jp$ ruby -rubygems -rpg -e "p pgerror" ruby: no such file load -- pg (loaderror) bigmac:/ jp$  

i running exact same problem trying run heroku db:pull local postgresql database using pg gem. randomly ended fixing problem removing following gems:

activerecord-jdbc-adapter  activerecord-jdbcpostgresql-adapter 

tried again after removing gems , managed pull heroku successfully. try checking gem file gems relate postgres other pg gem , remove it. best


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -