推到Heroku失败了

时间:2013-12-07 19:15:05

标签: ruby-on-rails heroku

尝试推送到heroku然而我得到Push拒绝,无法编译ruby应用程序。 (详见下文)任何想法从哪里开始?我想我必须从安装sqlite 1.3.8 gem开始,但是sqlite3 1.3.8 gem在我的本地gem列表(RVM)中。感谢!!!

Ubuntu 13.10 
Ruby 2.0.0
Rails 4.0.2
RVM 1.24.7
Bundler version 1.3.5

vern@vern:~/dev/project1 (master)$ git push heroku master
Warning: Permanently added the RSA host key for IP address '50.19.85.132' to the list of known hosts.
Counting objects: 69, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (57/57), done.
Writing objects: 100% (69/69), 14.86 KiB | 0 bytes/s, done.
Total 69 (delta 8), reused 0 (delta 0)

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.3.2
       New app detected loading default bundler cache
       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/..
       Using rake (10.1.0)
       Installing i18n (0.6.9)
       Using minitest (4.7.5)
       Using multi_json (1.8.2)
       Using atomic (1.1.14)
       Using thread_safe (0.1.3)
       Using tzinfo (0.3.38)
       Installing activesupport (4.0.2)
       Using builder (3.1.4)
       Using erubis (2.7.0)
       Using rack (1.5.2)
       Using rack-test (0.6.2)
       Installing actionpack (4.0.2)
       Installing mime-types (1.25.1)
       Using polyglot (0.3.3)
       Using treetop (1.4.15)
       Using mail (2.5.4)
       Installing actionmailer (4.0.2)
       Installing activemodel (4.0.2)
       Using activerecord-deprecated_finders (1.0.3)
       Using arel (4.0.1)
       Installing activerecord (4.0.2)
       Using coffee-script-source (1.6.3)
       Using execjs (2.0.2)
       Using coffee-script (2.2.0)
       Using thor (0.18.1)
       Installing railties (4.0.2)
       Using coffee-rails (4.0.1)
       Using hike (1.2.3)
       Installing jbuilder (1.5.3)
       Using jquery-rails (3.0.4)
       Using json (1.8.1)
       Using bundler (1.3.2)
       Using tilt (1.4.1)
       Installing sprockets (2.10.1)
       Using sprockets-rails (2.0.1)
       Installing rails (4.0.2)
       Using rdoc (3.12.2)
       Using sass (3.2.12)
       Using sass-rails (4.0.1)
       Using sdoc (0.3.20)
       Installing sqlite3 (1.3.8)
       Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
       /tmp/build_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/ruby-2.0.0/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_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/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_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.8 for inspection.
       Results logged to /tmp/build_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/bundle/ruby/2.0.0/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/..
       Using rake (10.1.0)
       Installing i18n (0.6.9)
       Using minitest (4.7.5)
       Using multi_json (1.8.2)
       Using atomic (1.1.14)
       Using thread_safe (0.1.3)
       Using tzinfo (0.3.38)
       Installing activesupport (4.0.2)
       Using builder (3.1.4)
       Using erubis (2.7.0)
       Using rack (1.5.2)
       Using rack-test (0.6.2)
       Installing actionpack (4.0.2)
       Installing mime-types (1.25.1)
       Using polyglot (0.3.3)
       Using treetop (1.4.15)
       Using mail (2.5.4)
       Installing actionmailer (4.0.2)
       Installing activemodel (4.0.2)
       Using activerecord-deprecated_finders (1.0.3)
       Using arel (4.0.1)
       Installing activerecord (4.0.2)
       Using coffee-script-source (1.6.3)
       Using execjs (2.0.2)
       Using coffee-script (2.2.0)
       Using thor (0.18.1)
       Installing railties (4.0.2)
       Using coffee-rails (4.0.1)
       Using hike (1.2.3)
       Installing jbuilder (1.5.3)
       Using jquery-rails (3.0.4)
       Using json (1.8.1)
       Using bundler (1.3.2)
       Using tilt (1.4.1)
       Installing sprockets (2.10.1)
       Using sprockets-rails (2.0.1)
       Installing rails (4.0.2)
       Using rdoc (3.12.2)
       Using sass (3.2.12)
       Using sass-rails (4.0.1)
       Using sdoc (0.3.20)
       Installing sqlite3 (1.3.8)
       Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

       /tmp/build_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/ruby-2.0.0/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_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/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_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.8 for inspection.
       Results logged to /tmp/build_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/bundle/ruby/2.0.0/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 app

To git@heroku.com:intense-shelf-6622.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:intense-shelf-6622.git'
vern@vern:~/dev/project1 (master)$ 

2 个答案:

答案 0 :(得分:2)

You can't use SQLite on Heroku,你必须使用PostgreSQL。

您可以将其设置为在Heroku上使用PostgreSQL,但在开发中使用SQLite,在开发和生产环境中使用相同的数据库是一种很好的做法。

答案 1 :(得分:0)

从日志中查看这些行:

 !     Detected sqlite3 gem which is not supported on Heroku.
 !     https://devcenter.heroku.com/articles/sqlite3

你需要在Heroku上使用Postgres来获取RDBMS。或者您可以选择MongoDB和Neo4J以及非关系数据存储。