herokuと同じ環境で動作するように、RailsアプリをPostGreSqlに移行しようとしています...
postgres、pg、postgres-prをMacに正常にインストールしましたが、データベースをHerokuからpostgresqlサーバーにプルするためにTapsを取得できません。
MyRailsAppsはデータベースにシームレスに接続します。
私がirbに遭遇したとき、これは私が得るものです:
>> require "rubygems"
=> false
>> require "sequel"
=> true
>> DB = Sequel.postgres
NameError: uninitialized constant Sequel::Postgres::PGError
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/adapters/postgres.rb:89
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `k_require'
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:249:in `tsk_require'
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:72:in `check_requiring_thread'
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:69:in `synchronize'
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:69:in `check_requiring_thread'
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:249:in `tsk_require'
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/database/connecting.rb:25:in `adapter_class'
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/database/connecting.rb:63:in `connect'
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:119:in `connect'
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:282:in `adapter_method'
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:289:in `postgres'
from (irb):3
>>
何が悪いのかわかりません。
誰かアイデアがありますか?
これは私がジェレミーを得るものです
BigMac:~ jp$ ruby -rubygems -rpg -e "p PGError"
ruby: no such file to load -- pg (LoadError)
BigMac:~ jp$ ruby -rubygems -rpostgres -e "p PGError"
ruby: no such file to load -- postgres (LoadError)
「パスのどこかにpg.rbまたはpostgres.rbを確認してください」とはどういう意味かわかりません。
$ PATH内のすべてのディレクトリをスキャンして、不要なpg.rbまたはpostgres.rbファイルを探す必要がありますか?
pgとpostgreをインストールしたのでそれは奇妙です
これが私が今走ったものです
BigMac:/ jp$ sudo gem install pg
Password:
Building native extensions. This could take a while...
Successfully installed pg-0.10.0
1 gem installed
Installing ri documentation for pg-0.10.0...
Installing RDoc documentation for pg-0.10.0...
BigMac:/ jp$ ruby -rubygems -rpg -e "p PGError"
ruby: no such file to load -- pg (LoadError)
BigMac:/ jp$