![](/img/trans.png)
[英]Error installing mysql2 adapter: Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (cannot load such file — mysql2/mysql2)
[英]capistrano error msg: Please install the pg adapter: `gem install activerecord-pg-adapter` (cannot load such file --
我正在使用capistrano並收到此錯誤消息:
Please install the pg adapter: `gem install activerecord-pg-adapter` (cannot load such file -- active_record/connection_adapters/pg_adapter)
我從我的Gemfile中刪除了寶石'pg'並bundle install
d。 我在Gemfile.lock中沒有看到pg gem。 我還將生產數據庫更改為sqlite3適配器。 為什么Rails 3.2 / Capistrano / Bundler要求這個? 我沒有使用它,而不是在Gemfile.lock中,我該如何解決它? 我正在服務器上使用ubuntu 12.04。
thx提前
此外,當我運行它告訴我運行的東西時,我得到:
deploy@oahu:~$ gem install activerecord-pg-adapter
ERROR: Could not find a valid gem 'activerecord-pg-adapter' (>= 0) in any repository
^CERROR: Interrupted
deploy@oahu:~$ \
**編輯1 **
從應用程序的根源
Fri Mar 22$ grep -ri 'pg-adapter' *
Fri Mar 22$
database.yml的
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
這是github上的database.yml文件的屏幕截圖:
檢查你的database.yml
。 當Postgres的正確適配器是postgresql
時,你可能有一個名為pg-adapter
的條目。 如果您刪除或替換它,這應該工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.