【问题标题】:Installing rails app with sqlite on heroku在 Heroku 上使用 sqlite 安装 Rails 应用程序
【发布时间】:2014-10-09 03:41:15
【问题描述】:

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

阅读以前的stackoverflow答案 我将我的 gemfile 更改如下
group :production, :staging do gem 'pg', '0.17.1' end

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

但它仍然在捆绑安装时出错
Gem::Ext::BuildError: 错误: 无法构建 gem 原生扩展。 /Users/akash.bansal/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb 检查 pg_config... 否 没有 pg_config... 无论如何都在尝试。如果构建失败,请重试 --with-pg-config=/path/to/pg_config 检查 libpq-fe.h... 否 找不到'libpq-fe.h 标头 * extconf.rb 失败 * 由于某种原因无法创建 Makefile,可能缺少 必要的库和/或头文件。查看 mkmf.log 文件了解更多信息 细节。您可能需要配置选项。

提供的配置选项:
--with-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=/Users/akash.bansal/.rvm/rubies/ruby-1.9.3-p448/bin/ruby
--with-pg
--没有-pg
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--没有-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--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-darwin-13/1.9.1/pg-0.17.1/gem_make.out`

【问题讨论】:

标签: ruby-on-rails sqlite heroku pg


【解决方案1】:

您需要在本地计算机上安装 Postgres 才能运行 bundle install。为此运行brew install postgresql。如果你没有 Homebrew,你可以安装它here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-24
    • 2017-03-25
    相关资源
    最近更新 更多