繁体   English   中英

无法将我的代码推送到heroku master

[英]Can't push my code to heroku master

我试图将我的应用程序推送到heroku但是遇到了一些错误。

请多多帮助

github链接: https//github.com/zombie7158/testapp

系统信息:ruby 1.9.3p448(2013-06-27修订版41675)[x86_64-darwin12.4.1]

Rails 4.0.0

运行ruby -v附加到终端... up,run.9339

ruby 1.9.2p290(2011-07-09修订版32553)[x86_64-linux]

错误信息:

 Counting objects: 83, done.
Delta compression using up to 4 threads.
Compressin**strong text**g objects: 100% (72/72), done.
Writing objects: 100% (83/83), 16.26 KiB, done.
Total 83 (delta 16), reused 0 (delta 0)

-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using Bundler version 1.3.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
       Fetching gem metadata from https://rubygems.org/.........
       Fetching gem metadata from https://rubygems.org/..
       Installing rake (10.1.0)
       Installing i18n (0.6.5)
       Installing minitest (4.7.5)
       Installing multi_json (1.7.9)
       Installing atomic (1.1.13)
       Installing thread_safe (0.1.2)
       Installing tzinfo (0.3.37)
       Installing activesupport (4.0.0)
       Installing builder (3.1.4)
       Installing erubis (2.7.0)
       Installing rack (1.5.2)
       Installing rack-test (0.6.2)
       Installing actionpack (4.0.0)
       Installing mime-types (1.25)
       Installing polyglot (0.3.3)
       Installing treetop (1.4.15)
       Installing mail (2.5.4)
       Installing actionmailer (4.0.0)
       Installing activemodel (4.0.0)
       Installing activerecord-deprecated_finders (1.0.3)
       Installing arel (4.0.0)
       Installing activerecord (4.0.0)
       Installing coffee-script-source (1.6.3)
       Installing execjs (2.0.1)
       Installing coffee-script (2.2.0)
       Installing thor (0.18.1)
       Installing railties (4.0.0)
       Installing coffee-rails (4.0.0)
       Installing hike (1.2.3)
       Installing jbuilder (1.5.1)
       Installing jquery-rails (3.0.4)
       Installing json (1.8.0)
       Installing pg (0.16.0)
       Using bundler (1.3.2)
       Installing tilt (1.4.1)
       Installing sprockets (2.10.0)
       Installing sprockets-rails (2.0.0)
       Installing rails (4.0.0)
       Installing rdoc (3.12.2)
       Installing sass (3.2.10)
       Installing sass-rails (4.0.0)
       Installing sdoc (0.3.20)
       Installing sqlite3 (1.3.8)
       **Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
       /tmp/build_1xda9qa93kq4/vendor/ruby-1.9.3/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=/tmp/build_1xda9qa93kq4/vendor/ruby-1.9.3/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_1xda9qa93kq4/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.8 for inspection.
       Results logged to /tmp/build_1xda9qa93kq4/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.8/ext/sqlite3/gem_make.out
       An error occurred while installing sqlite3 (1.3.8), and Bundler cannot continue.
       Make sure that `gem install sqlite3 -v '1.3.8'` succeeds before bundling.
       Bundler Output: Fetching gem metadata from https://rubygems.org/.........
       Fetching gem metadata from https://rubygems.org/..
       Installing rake (10.1.0)
       Installing i18n (0.6.5)
       Installing minitest (4.7.5)
       Installing multi_json (1.7.9)
       Installing atomic (1.1.13)
       Installing thread_safe (0.1.2)
       Installing tzinfo (0.3.37)
       Installing activesupport (4.0.0)
       Installing builder (3.1.4)
       Installing erubis (2.7.0)
       Installing rack (1.5.2)
       Installing rack-test (0.6.2)
       Installing actionpack (4.0.0)
       Installing mime-types (1.25)
       Installing polyglot (0.3.3)
       Installing treetop (1.4.15)
       Installing mail (2.5.4)
       Installing actionmailer (4.0.0)
       Installing activemodel (4.0.0)
       Installing activerecord-deprecated_finders (1.0.3)
       Installing arel (4.0.0)
       Installing activerecord (4.0.0)
       Installing coffee-script-source (1.6.3)
       Installing execjs (2.0.1)
       Installing coffee-script (2.2.0)
       Installing thor (0.18.1)
       Installing railties (4.0.0)
       Installing coffee-rails (4.0.0)
       Installing hike (1.2.3)
       Installing jbuilder (1.5.1)
       Installing jquery-rails (3.0.4)
       Installing json (1.8.0)
       Installing pg (0.16.0)
       Using bundler (1.3.2)
       Installing tilt (1.4.1)
       Installing sprockets (2.10.0)
       Installing sprockets-rails (2.0.0)
       Installing rails (4.0.0)
       Installing rdoc (3.12.2)
       Installing sass (3.2.10)
       Installing sass-rails (4.0.0)
       Installing sdoc (0.3.20)
       Installing sqlite3 (1.3.8)
       **Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

       /tmp/build_1xda9qa93kq4/vendor/ruby-1.9.3/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=/tmp/build_1xda9qa93kq4/vendor/ruby-1.9.3/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_1xda9qa93kq4/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.8 for inspection.
       Results logged to /tmp/build_1xda9qa93kq4/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.8/ext/sqlite3/gem_make.out
       An error occurred while installing sqlite3 (1.3.8), and Bundler cannot continue.
       Make sure that `gem install sqlite3 -v '1.3.8'` 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/Rails app

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

只是删除它

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

并添加

gem 'pg'

给你Gemfile并在项目目录中运行bundle

Heroku与postgres合作

问题解决但我不知道为什么? 有我的一步。

  1. 在我的gemfile中添加ruby'2.0.0 ruby '2.0.0'

  2. bundle install --without production

然后我检查heroku ruby​​ ver。 通过run 'ruby -v'

表明:

运行ruby -v附加到终端... up,run.4896

ruby 2.0.0p247(2013-06-27修订版41674)[x86_64-linux]

它如下所示:

ruby 1.9.2p290(2011-07-09修订版32553)[x86_64-linux]

有人能告诉我为什么吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM