昨天我安装了 Ubuntu 16.04.1。
ruby 2.3.1p112(2016-04-26 修订版 54768)[x86_64-linux]
rails -v '4.2.6' 创建一个 Rails 项目
运行bundle
出现错误:
Errno::EACCES: Permission denied @ rb_sysopen - /home/zeus/.rbenv/versions /2.3.1/lib/ruby/gems/2.3.0/gems/pg-0.19.0/.gemtest
An error occurred while installing pg (0.19.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.19.0'` succeeds before bundling.
当运行 gem install pg -v '0.19.0'
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /home/zeus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/pg-0.19.0/.gemtest
最佳答案
在 Ubuntu 中,您需要安装 libpq-dev
包。
试试这个:
sudo apt-get install libpq-dev
对于 CentOS 7,您需要安装 postgresql-devel
包。
sudo yum install postgresql-devel
关于ruby-on-rails - 安装pg(0.19.0)时出错,Bundler无法继续,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40286351/