当我运行git push heroku master命令时,Heroku push失败 [英] Heroku push failed when i run git push heroku master command

查看:96
本文介绍了当我运行git push heroku master命令时,Heroku push失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Rails 3.2.6Ruby 1.9.3.我已经创建了应用程序,并已使用 git push 在GitHub存储库中推送了该应用程序.

I am using Rails 3.2.6 and Ruby 1.9.3. I have created application and I have push that application at GitHub repository by using git push.

当我使用 git push heroku master 命令在Heroku上部署应用程序时,出现以下错误:

When I deploy application at Heroku by using git push heroku master command, i got following error:

Initializing repository, done. 
Counting objects: 82, done. 
Delta compression using up to 2 threads. 
Compressing objects: 100% (64/64), done. 
Writing objects: 100% (82/82), 152.43 KiB, done. 
Total 82 (delta 10), reused 0 (delta 0) 

-----> Ruby app detected 
-----> Compiling Ruby/Rails 
-----> Using Ruby version: ruby-2.0.0 
-----> Installing dependencies using 1.5.2 
   New app detected loading default bundler cache 
   Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment 
   Fetching gem metadata from https://rubygems.org/......... 
   Fetching additional metadata from https://rubygems.org/.. 
   Using i18n (0.6.9) 
   Using builder (3.0.4) 
   Using erubis (2.7.0) 
   Using journey (1.0.4) 
   Using hike (1.2.3) 
   Using tilt (1.4.1) 
   Using rack (1.4.5) 
   Using mime-types (1.25.1) 
   Using polyglot (0.3.4) 
   Using arel (3.0.3) 
   Using coffee-script-source (1.7.0) 
   Using execjs (2.0.2) 
   Using json (1.8.1) 
   Installing multi_json (1.9.2) 
   Using bundler (1.5.2) 
   Installing rake (10.2.0) 
   Installing thor (0.19.1) 
   Using rack-cache (1.2) 
   Using rack-test (0.6.2) 
   Installing tzinfo (0.3.39) 
   Using treetop (1.4.15) 
   Using coffee-script (2.2.0) 
   Using rdoc (3.12.2) 
   Installing rack-ssl (1.3.4) 
   Installing sass (3.3.4) 
   Using sprockets (2.2.2) 
   Using mail (2.5.4) 
   Installing uglifier (2.5.0) 
   Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 
   /tmp/build_3ff255db-d2c4-4488-8306-68f5b04b882e/vendor/ruby-2.0.0/bin/ruby extconf.rb 
   checking for sqlite3.h... no 
   sqlite3.h is missing. Try 'port install sqlite3 +universal', 
   'yum install sqlite-devel' or 'apt-get install libsqlite3-dev' 
   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=/tmp/build_3ff255db-d2c4-4488-8306-68f5b04b882e/vendor/ruby-2.0.0/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}/ 
   --enable-local 
   --disable-local 
   Gem files will remain installed in /tmp/build_3ff255db-d2c4-4488-8306-68f5b04b882e/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.9 for inspection. 
   Results logged to /tmp/build_3ff255db-d2c4-4488-8306-68f5b04b882e/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.9/ext/sqlite3/gem_make.out 
   Installing activesupport (3.2.16) 
   An error occurred while installing sqlite3 (1.3.9), and Bundler cannot continue. 
   Make sure that `gem install sqlite3 -v '1.3.9'` succeeds before bundling. 
   Bundler Output: Fetching gem metadata from https://rubygems.org/......... 
   Fetching additional metadata from https://rubygems.org/.. 
   Using i18n (0.6.9) 
   Using builder (3.0.4) 
   Using erubis (2.7.0) 
   Using journey (1.0.4) 
   Using hike (1.2.3) 
   Using tilt (1.4.1) 
   Using rack (1.4.5) 
   Using mime-types (1.25.1) 
   Using polyglot (0.3.4) 
   Using arel (3.0.3) 
   Using coffee-script-source (1.7.0) 
   Using execjs (2.0.2) 
   Using json (1.8.1) 
   Installing multi_json (1.9.2) 
   Using bundler (1.5.2) 
   Installing rake (10.2.0) 
   Installing thor (0.19.1) 
   Using rack-cache (1.2) 
   Using rack-test (0.6.2) 
   Installing tzinfo (0.3.39) 
   Using treetop (1.4.15) 
   Using coffee-script (2.2.0) 
   Using rdoc (3.12.2) 
   Installing rack-ssl (1.3.4) 
   Installing sass (3.3.4) 
   Using sprockets (2.2.2) 
   Using mail (2.5.4) 
   Installing uglifier (2.5.0) 

   Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

   /tmp/build_3ff255db-d2c4-4488-8306-68f5b04b882e/vendor/ruby-2.0.0/bin/ruby extconf.rb 
   checking for sqlite3.h... no 
   sqlite3.h is missing. Try 'port install sqlite3 +universal', 
   'yum install sqlite-devel' or 'apt-get install libsqlite3-dev' 
   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=/tmp/build_3ff255db-d2c4-4488-8306-68f5b04b882e/vendor/ruby-2.0.0/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}/ 
   --enable-local 
   --disable-local 


   Gem files will remain installed in /tmp/build_3ff255db-d2c4-4488-8306-68f5b04b882e/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.9 for inspection. 
   Results logged to /tmp/build_3ff255db-d2c4-4488-8306-68f5b04b882e/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.9/ext/sqlite3/gem_make.out 
   Installing activesupport (3.2.16) 
   An error occurred while installing sqlite3 (1.3.9), and Bundler cannot continue. 
   Make sure that `gem install sqlite3 -v '1.3.9'` succeeds before bundling. 
 ! 
 !     Failed to install gems via Bundler. 
 !     
 !     Detected sqlite3 gem which is not supported on Heroku. 
 !     https://devcenter.heroku.com/articles/sqlite3 
 ! 

 !     Push rejected, failed to compile Ruby app 

 To git@heroku.com:quiet-bastion-4831.git 
 ! [remote rejected] master -> master (pre-receive hook declined) 
 error: failed to push some refs to 'git@heroku.com:quiet-bastion-4831.git' 

我不明白,这是怎么回事?

I can't get it, what is going on?

如何部署到Heroku?

How can I able deploy to Heroku?

推荐答案

看到错误,我可以说您没有在本地运行assets:precompile任务.

By seeing error, I can say you did not run assets:precompile task locally.

现在,在使用 git push heroku master 命令之前,只需执行以下步骤:

Now, before using git push heroku master command, you just follow following steps:

RAILS_ENV=production bundle exec rake assets:precompile
git add public/assets
git commit -m "vendor compiled assets"

完成上述步骤后,使用 git push heroku master 命令,这将有助于将应用程序部署到Heroku.

After above steps, use git push heroku master command, this will helpful to deploy application to Heroku.

您可以从此链接将资产管道打开Heroku Cedar .

我希望这会对您有所帮助.

I hope this will help you.

这篇关于当我运行git push heroku master命令时,Heroku push失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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