Postgres - the last version 0.14.0 of the “pg” gem gives error

孤街浪徒 提交于 2019-12-18 08:24:47

问题


I have updated my bundler which contains pg gem and I got the error

An error occured while installing pg (0.14.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.14.0'` succeeds before bundling.

I have checked this gem on rubygems.org and today (June 23) was released this version. I don't know why, but the version doesn't works me correctly and return the error above.

The solution is set up the specific version - in this case

gem "pg", "~> 0.13.2"

Anyone with the same issue?


回答1:


You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.

You don't need to specify a specific version of PG in your Gemfile

So :

sudo apt-get install ruby-dev libpq-dev build-essential


来源:https://stackoverflow.com/questions/11172264/postgres-the-last-version-0-14-0-of-the-pg-gem-gives-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!