我已經安裝了我在How to handle Ruby on Rails error: "Please install the postgresql adapter: `gem install activerecord-postgresql-adapter'"中列出的所有寶石 - 它們都不起作用。不要緊,如果我在我的databases.yml文件中有postgres或postgresql。嘗試運行服務器時Ruby on Rails postgres適配器錯誤
我不知道我在做什麼錯了(我也裝在錯誤中提到的驅動程序也是如此。我不斷收到這個錯誤。
/var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:147:in `gem': Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.)
我試圖運行「軌道服務器的WEBrick -p 80 -e生產的」
production:
adapter: postgresql
encoding: unicode
database: imentor
pool: 5
username: postgres
password:
host: localhost
port: 5432
我的問題是,我不知道該往哪兒編輯的Gemfile((看了看錯誤的寶石文件原本)
將「gem'pg'」添加到Gemfile中修復它。由於'畝太短'
在你的Gemfile什麼? –
我在/ usr/bin/gem中添加了我的內容(不是100%確定是否這是正確的 - 我還添加了'pg') – StanM
您應該在您的根目錄下有一個名爲'Gemfile'的文件Rails應用程序。 –