Ask*_*kar 8 ruby-on-rails linux-mint pg ruby-on-rails-4
运行
gem install pg -v '0.15.1'
Run Code Online (Sandbox Code Playgroud)
给出错误:
构建原生扩展.这可能需要一段时间...错误:安装pg时出错:错误:无法构建gem原生扩展.
Run Code Online (Sandbox Code Playgroud)/home/askar/.rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb checking for pg_config... no No pg_config... trying anyway. If构建失败,请再次尝试使用--with -pg-config =/path/to/pg_config检查libpq-fe.h ...否找不到'libpq-fe.h header *extconf.rb失败*由于某些原因无法创建Makefile,可能缺少必要的库和/或标头.检查mkmf.log文件以获取更多详细信息.您可能需要配置选项.
提供的配置选项: - with-opt-dir --without-opt-dir --with-opt-include --without-opt-include = $ {opt-dir}/include --with-opt-lib - without-opt-lib = $ {opt-dir}/lib --with-make-prog --without-make-prog --srcdir =.--curdir --ruby =/home/askar/.rvm/rubies/ruby-1.9.3-p429/bin/ruby --with-pg --without-pg --with-pg-dir --without-pg -dir --with-pg-include --without-pg-include = $ {pg-dir}/include --with-pg-lib --without-pg-lib = $ {pg-dir}/lib - with-pg-config --without-pg-config --with-pg_config --without-pg_config
Gem文件将保留在/home/askar/.rvm/gems/ruby-1.9.3-p429/gems/pg-0.15.1中进行检查.结果登录到/home/askar/.rvm/gems/ruby-1.9.3-p429/gems/pg-0.15.1/ext/gem_make.out
我正在使用
dep*_*epa 13
您需要为pggem 安装本机扩展.
sudo apt-get install libpq-dev
Run Code Online (Sandbox Code Playgroud)