HEROKU - 无法运行 git push heroku master [重复]

2024-07-04

我运行命令

heroku create --stack cedar
git push heroku master

但它给了我一个错误:

> Counting objects: 144, done. Delta compression using up to 2 threads.
> Compressing objects: 100% (128/128), done. Writing objects: 100%
> (144/144), 50.16 KiB, done. Total 144 (delta 23), reused 0 (delta 0)
> 
> -----> Heroku receiving push
> -----> Ruby/Rails app detected
> -----> Installing dependencies using Bundler version 1.1.rc
>        Running: bundle install --without development:test --path vendor/bundle --deployment
>        Fetching gem metadata from http://rubygems.org/.......
>        Installing rake (0.9.2.2)
>        Installing multi_json (1.0.3)
>        Installing activesupport (3.1.1)
>        Installing builder (3.0.0)
>        Installing i18n (0.6.0)
>        Installing activemodel (3.1.1)
>        Installing erubis (2.7.0)
>        Installing rack (1.3.5)
>        Installing rack-cache (1.1)
>        Installing rack-mount (0.8.3)
>        Installing rack-test (0.6.1)
>        Installing hike (1.2.1)
>        Installing tilt (1.3.3)
>        Installing sprockets (2.0.3)
>        Installing actionpack (3.1.1)
>        Installing mime-types (1.17.2)
>        Installing polyglot (0.3.2)
>        Installing treetop (1.4.10)
>        Installing mail (2.3.0)
>        Installing actionmailer (3.1.1)
>        Installing arel (2.2.1)
>        Installing tzinfo (0.3.30)
>        Installing activerecord (3.1.1)
>        Installing activeresource (3.1.1)
>        Installing coffee-script-source (1.1.2)
>        Installing execjs (1.2.9)
>        Installing coffee-script (2.2.0)
>        Installing rack-ssl (1.3.2)
>        Installing json (1.6.1) with native extensions
>        Installing rdoc (3.11)
>        Installing thor (0.14.6)
>        Installing railties (3.1.1)
>        Installing coffee-rails (3.1.1)
>        Installing jquery-rails (1.0.16)
>        Installing pg (0.11.0) with native extensions
>        Using bundler (1.1.rc)
>        Installing rails (3.1.1)
>        Installing sass (3.1.10)
>        Installing sass-rails (3.1.4)
>        **Installing sqlite3 (1.3.4) with native extensions Unfortunately, a fatal error has occurred. Please report this error to
> the Bundler issue tracker at
> https://github.com/carlhuda/bundler/issues so that we can fix it.
> Thanks!**
>        /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native
> extension. (Gem::Installer::ExtensionBuildError)
>        /usr/local/bin/ruby extconf.rb
>        checking for sqlite3.h... no
>        sqlite3.h is missing. Try 'port install sqlite3 +universal'
>        or 'yum install sqlite3-devel' and check your shared library search path (the
>        location where your sqlite3 shared library is located).
>        *** extconf.rb failed ***
>        Could not create Makefile due to some reason, probably lack of
>        necessary libraries and/or headers.  Check the mkmf.log file for more
>        details.  You may need configuration options.
>        Provided configuration options:
>        --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=/usr/local/bin/ruby
>        --with-sqlite3-dir
>        --without-sqlite3-dir
>        --with-sqlite3-include
>        --without-sqlite3-include=${sqlite3-dir}/include
>        --with-sqlite3-lib
>        --without-sqlite3-lib=${sqlite3-dir}/lib
>        --enable-local
>        --disable-local
>        Gem files will remain installed in /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.4
> for inspection.
>        Results logged to /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.4/ext/sqlite3/gem_make.out
>        from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:486:in `block in build_extensions'
>        from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:446:in `each'
>        from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:446:in `build_extensions'
>        from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:198:in `install'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/source.rb:90:in
> `block in install'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/rubygems_integration.rb:78:in
> `preserve_paths'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/source.rb:89:in
> `install'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/installer.rb:73:in
> `block in install_gem_from_spec'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/rubygems_integration.rb:93:in
> `with_build_args'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/installer.rb:72:in
> `install_gem_from_spec'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/installer.rb:56:in
> `block in run'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/installer.rb:55:in
> `run'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/installer.rb:12:in
> `install'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/cli.rb:219:in
> `install'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/vendor/thor/task.rb:22:in
> `run'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/vendor/thor.rb:263:in
> `dispatch'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/lib/bundler/vendor/thor/base.rb:386:in
> `start'
>        from /tmp/build_272b7nu18wwh5/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc/bin/bundle:13:in
> `<top (required)>'
>        from vendor/bundle/ruby/1.9.1/bin/bundle:19:in `load'
>        from vendor/bundle/ruby/1.9.1/bin/bundle:19:in `<main>'  !  !     Failed to install gems via Bundler.  !  !     Heroku push rejected,
> failed to compile Ruby/rails app
> 
> To [email protected] /cdn-cgi/l/email-protection:falling-ice-5948.git  ! [remote rejected] master ->
> master (pre-receive hook declined) error: failed to push some refs to
> '[email protected] /cdn-cgi/l/email-protection:falling-ice-5948.git'

EDIT- 这篇文章可能真的很有帮助:sqlite3-ruby安装错误 https://stackoverflow.com/q/3458602/1021970


将其添加到您的 Gemfile 中,

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

然后做一个bundle然后重新推送到heroku。您无法在 Heroku 上使用 sqlite3 - 这是错误的原因。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

HEROKU - 无法运行 git push heroku master [重复] 的相关文章

  • Postgres / Rails Active Record -- 查询舍入浮点值

    我在 Rails 应用程序中使用 Postgres 将纬度 经度作为浮点值存储在数据库中 我希望能够比较位置的纬度 经度 但我只知道如何做到完全相等 Location where lat lat lon lon 我的问题是 我希望 Post
  • PGError:错误:关系“用户”的列“电子邮件”已存在

    我一直在本地主机上开发一个网站 效果很好 今天早上 我尝试使用命令 git push heroku master 然后 heroku run rake db migrate 将其推送到heroku 当我尝试执行第二个操作时 出现错误 Con
  • 如何在Rails启动时创建线程?

    我试图在 Rails 启动时创建一个线程 该线程将在应用程序的整个生命周期中运行 奇怪的是 我已经将其与我正在运行的另一个线程一起使用了 我复制了该 工作 代码并将其用作新线程的新代码的样板 但线程不会启动 代码位于配置 初始化程序中 这是
  • 为什么二进制文件在压缩时会损坏?

    我有一项通过网络提供压缩文件的服务 该 zip 包含 Windows 平台的可执行文件 我正在使用 RubyZip 库来压缩文件 但该过程会损坏二进制文件 在我的本地服务器上 我们通过系统调用使用 zip 命令 它工作正常 zip 命令在
  • 为什么二进制文件在压缩时会损坏?

    我有一项通过网络提供压缩文件的服务 该 zip 包含 Windows 平台的可执行文件 我正在使用 RubyZip 库来压缩文件 但该过程会损坏二进制文件 在我的本地服务器上 我们通过系统调用使用 zip 命令 它工作正常 zip 命令在
  • Postgres 查询包含某些内容的 JSON 数组

    Postgres 有这种 JSON 数据类型 我想知道如何查询 JSON 数组内的数据 我正在使用 Postgres 9 3 1 我已插入 PUBLISHER 表 该表具有这 2 个字段名称 字符串和数据 json INSERT INTO
  • 带参数的 Rails link_to 远程

    我想使用链接触发模型的远程操作 基本上 这个链接所需要做的就是触发一个带有一个参数的方法 这是我的代码 link to Move Up reorder collection folder path collection folder reo
  • heroku 平台上的 Python 应用程序似乎在两个线程上启动

    有一个简单的Python应用程序部署在heroku平台上 from flask import Flask log APP STARTED single time connection to database and logging stuf
  • 传递嵌套属性时出现“NoMethodError(未定义方法‘with_in Different_access’...”

    在谷歌上搜索了一段时间 但没有运气 在传递嵌套属性时 我的 Web 服务上出现 NoMethodError 未定义方法 with in Different access 错误 其他嵌套的也可以工作 但是它们是一对一的 而这是一对多的 cla
  • Jekyll / gem:未解决的规格

    我正在使用 Jekyll 我有两个独立的存储库 我想我最近更新了一个 上次我渲染博客时一切正常 现在只是这样 jekyll serve watch WARN Unresolved specs during Gem Specification
  • 为什么我的黄瓜场景在步骤一起运行时会失败,但在单独运行时会通过?

    当我将黄瓜场景作为一个整体运行时 或者使用命令 cucumber 我有 7 个失败的步骤 当我使用 正在进行的工作 标签单独运行它们时 它们通过得很好 我不认为这是数据库状态问题 我正在使用事务运行 我也尝试在没有事务的情况下运行并使用数据
  • Python:sqlite 找不到 sqlite 的匹配发行版

    我尝试在控制台中通过 pip 安装该库 我正在使用 win7 和 python v 2 7 10 但未能实现 根据this https stackoverflow com questions 22976019 how to get tabl
  • Rails 3.1 和 Coffeescript 出现“找不到变量”错误

    我的应用程序中有引用我的 application js 文件的视图 该文件包含我在整个应用程序中使用的函数 在使用了 3 1 的边缘版本后 我刚刚安装了 Rails 3 1 候选版本 在安装 RC 之前 我没有遇到任何问题 但现在我收到此错
  • 从 irb 获取所有局部变量或可用方法?

    当我进入 irb 并输入不存在的命令时 我收到一条错误消息 undefined local variable or method my method for main Object NameError 有没有办法只获取可用的局部变量或方法的
  • 如何使用 Ruby 的新 lambda 语法?

    Ruby 有 lambda 语法 所以我可以使用 gt symbol a 0 new gt a lt 5 do puts a a 1 end 这非常有效 但是当我尝试这样做时 match to gt e 404 Hello I am mic
  • rails-created_at 当用户订购时,是否应该向表中添加索引?

    您好 我有一张模特照片 default scope order gt photos created at DESC photos version DESC 鉴于我按 CREATED AT 和版本进行排序 我应该在 CREATED AT 上有
  • AWS Elastic Beanstalk:推出新的 Rails 应用程序

    I just started using AWS elastic beanstalk to host a web app I wanted to make However after following the instructions t
  • Liquid 模板语言中的宏

    我正在使用 Jekyll 它使用 Liquid 模板语言 我过去使用过 Jinja 模板 它有一个概念macro http jinja pocoo org docs dev templates macros 只是一个命名函数 Liquid
  • SQlite - Android - 外键语法

    我一直在尝试让外键在我的 Android SQLite 数据库中工作 我尝试过以下语法 但它给了我强制关闭 private static final String TASK TABLE CREATE create table TASK TA
  • 确定字符串是否为有效的浮点值

    有没有一种方法可以简单地检查字符串值是否是有效的浮点值 如果字符串不是数值 则对字符串调用 to f 会将其转换为 0 0 当传递一个无效的浮点字符串时 使用 Float 会引发异常 该字符串更接近我想要的 但我不想处理捕获异常 我真正想要

随机推荐