请安装 postgresql 适配器:`gem install activerecord-postgresql-adapter`
可能的重复:
如何处理 Ruby on Rails错误:“请安装 postgresql 适配器:`gem install activerecord-postgresql-adapter'”
我正在尝试让 Redmine 与 postgres 一起使用。
在我的日志中我不断看到。
Please install the postgresql adapter: `gem install activerecord-postgresql-adapter`
谷歌搜索后,每个人都说你需要做 gem install pg。但是当我做 gem list 时,
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.8, 2.3.5)
activeresource (2.3.5)
activesupport (2.3.8, 2.3.5)
fastthread (1.0.7)
passenger (2.2.15)
pg (0.9.0)
postgres (0.7.9.2008.01.28)
postgres-pr (0.6.3)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
你可以清楚地看到 pg 已经安装了。还有其他人发现或解决了这个问题吗?
Possible Duplicate:
How to handle Ruby on Rails error: “Please install the postgresql adapter: `gem install activerecord-postgresql-adapter'”
I'm trying to get Redmine working with postgres.
In my logs I keep seeing.
Please install the postgresql adapter: `gem install activerecord-postgresql-adapter`
After googling everyone said you needed to do gem install pg. But when I do gem list
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.8, 2.3.5)
activeresource (2.3.5)
activesupport (2.3.8, 2.3.5)
fastthread (1.0.7)
passenger (2.2.15)
pg (0.9.0)
postgres (0.7.9.2008.01.28)
postgres-pr (0.6.3)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
You can clearly see that pg is already installed. Has anyone else found this issue or fixed it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
确保database.yml中的数据库适配器设置为“postgresql”。如果您仍然遇到同样的问题,请尝试使用 pure-ruby 适配器:(
确保您之前卸载了 pg gem...以避免冲突)
如果它有效,那么这是 postgres gem 的问题。无论如何,出于开发目的,使用纯红宝石宝石通常是可以的。
make sure your db-adapter in database.yml is set to "postgresql". If still you have the same problem, then try using the pure-ruby adapter:
(make sure you uninstall the pg gem before... to avoid conflicts)
If it works, then it's a problem with the postgres gem. Anyway, for development purposes, using the pure-ruby gem is usually ok.
我对 ruby-pg gem 有更多的运气
我尝试了许多其他 gems 'postgres', 'pg', 'postgres-pr' 但没有运气
我的环境是Ubuntu 10.4,ruby enterprise 1.8.7
ruby-pg为我解决了上述问题
I had more luck with the ruby-pg gem
I tried a number of the other gems 'postgres', 'pg', 'postgres-pr' with no luck
My environment was Ubuntu 10.4, ruby enterprise 1.8.7
ruby-pg resolved the above issue for me
对于 Debian scrape 来说是:
for debian squeeze it is:
当您在 database.yml 中错误输入适配器名称(例如“postrgesql”而不是“postgresql”)时,使用 Postgres 和 pg 的 Rails 3.0.4 中可能会出现类似(几乎相同)的错误:
请安装 postrgesql 适配器:
gem install activerecord-postrgesql-adapter
(没有要加载的文件 - active_record/connection_adapters/postrgesql_adapter)Similar (almost identical) errors can arise in Rails 3.0.4 with Postgres and pg, when you mistype the adapter name in your database.yml, for instance "postrgesql" instead of "postgresql":
Please install the postrgesql adapter:
gem install activerecord-postrgesql-adapter
(no such file to load -- active_record/connection_adapters/postrgesql_adapter)在带有 Rails 2.3.4 的 Windows 7 上为我工作
worked for me on Windows 7 with Rails 2.3.4
我从未使用过 postgre sql gem,但我之前通过将其添加到 config/preinitializer.rb 中解决了类似的错误。
注意:您必须使用自己的宝石位置。通常你可以通过运行
gem环境
来找到它们。您可能还会在这里找到一些有用的答案:
如何处理 Ruby on Rails 错误:“请安装 postgresql 适配器:`gem install activerecord-postgresql-adapter'”
I never worked with postgre sql gem, but I've solved similar error before by adding this into config/preinitializer.rb.
Note: you'll have to use your own gem locations. Usually you can find them by running
gem environment
.You may also find some answers here useful:
How to handle Ruby on Rails error: "Please install the postgresql adapter: `gem install activerecord-postgresql-adapter'"