Heroku Push-Git Push到Heroku时出错 [英] Heroku Push - Error with Git Push to Heroku

查看:141
本文介绍了Heroku Push-Git Push到Heroku时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试对heroku(git push heroku master)执行git push时出现错误.我在雪松堆栈上,我的Gemfile指定了sqlite 1.3.5.这是错误:

I'm getting an error when I try to do a git push to heroku (git push heroku master). I am on cedar stack and my Gemfile specifies sqlite 1.3.5. Here is the error:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
   /usr/local/bin/ruby extconf.rb
   checking for sqlite3.h... no
   sqlite3.h is missing. Try 'port install sqlite3 +universal'
   or 'yum install sqlite-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_3umr292rjcdek/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.5 for inspection.
   Results logged to /tmp/build_3umr292rjcdek/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.5/ext/sqlite3/gem_make.out
   An error occured while installing sqlite3 (1.3.5), and Bundler cannot continue.
   Make sure that `gem install sqlite3 -v '1.3.5'` succeeds before bundling.

! !无法通过Bundler安装gem. ! ! Heroku推送被拒绝,无法编译Ruby/rails应用

! ! Failed to install gems via Bundler. ! ! Heroku push rejected, failed to compile Ruby/rails app

推荐答案

我遇到的一个导致头痛"的问题是"tap"宝石.在我将其移至开发"组之前,这几乎对我造成了完全相同的错误:

One problem I had which caused hours of headaches was with the 'taps' gem. It was causing pretty much the exact same error for me until I moved it into the 'development' group:

group :production do 
  gem 'taps'
  gem 'pg'
end

不确定这是否直接适用于您,但是在我将:production插入之前,它会产生sqlite3错误.希望它将对某人有所帮助.

Not sure if this is directly applicable to you, but it produced sqlite3 errors until I put taps into :production. Hopefully it'll help someone.

编辑:@cloneofsnake:我没有足够的代表来评论您的答案,但我发现您的Gemfile中有'taps'宝石.摆脱它,或将其放入:production组; taps显然对sqlite3有一些依赖性.我已经将sqlite3换成了pg,但是直到我将"taps"转移到生产中时,我都遇到了与您相同的错误.

EDIT: @cloneofsnake: I don't have enough rep to comment on your answer, but I see you have the 'taps' gem in your Gemfile. Either get rid of it, or put it in the :production group; taps has some dependencies on sqlite3 apparently. I had already switched out sqlite3 for pg, but I was getting the same error as you until I moved 'taps' to production.

这篇关于Heroku Push-Git Push到Heroku时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆