在heroku上使用sqlite安装rails应用程序



您好,我正在尝试使用sqlite将我的rails应用程序部署到heroku

读取以前的stackoverflow答案我修改了我的gemfile如下
group :production, :staging do gem 'pg', '0.17.1' end

group :development, :test do gem 'sqlite3' end

但是在bundle install上仍然给出错误
Gem::Ext::BuildError: ERROR: Failed to build Gem native extension。/用户/akash.bansal/.rvm/红宝石/ruby-1.9.3-p448/bin/ruby extconf.rb检查pg_config…没有没有pg_config…不管怎样。如果构建失败,请使用——with-pg-config =/路径//pg_config检查libpq-fe.h…没有找不到'libpq-fe.h头文件 * extconf。*由于某些原因无法创建Makefile,可能缺乏必要的库和/或头文件。查看mkmf.log文件了解更多信息细节。您可能需要配置选项。

提供的配置选项:
——with-opt-dir
——with-opt-include
——without-opt-include = $ {opt-dir}/包括
——with-opt-lib
——without-opt-lib = $ {opt-dir}/lib
——with-make-prog
——without-make-prog
——srcdir =。
——curdir
——ruby =/用户/akash.bansal/.rvm/红宝石/ruby-1.9.3-p448/bin/ruby
——with-pg
——without-pg
——with-pg-config
——without-pg-config
——with-pg_config
——without-pg_config
——with-pg-dir
——without-pg-dir
——with-pg-include
——without-pg-include = $ {pg-dir}/包括
——with-pg-lib
——without-pg-lib = $ {pg-dir}/lib

extconf失败,退出代码1

Gem文件将继续安装在/Users/akash.bansal/sites/onemustwatch/.bundle/ruby/1.9.1/gems/pg-0.17.1中以供检查。结果记录到/Users/akash.bansal/sites/onemustwatch/.bundle/ruby/1.9.1/extensions/x86_64-达尔文-13/1.9.1/pg-0.17.1/gem_make.out '

您需要在本地机器上安装Postgres才能运行bundle install。运行brew install postgresql。如果你没有Homebrew,你可以在这里安装

最新更新