2016-05-17 7 views
2

私はherokuに簡単なレールアプリを配備しようとしていますが、私はそれを修正するために何をしようとしてもエラーを受け取り続けます。 バンドルを実行した後にsqlite3を開発に移動してGemfile.lockを削除しようとしましたが、まだエラーが発生します。 私は春を削除して宝石を更新しようとしましたが、まだエラーが発生します。 現時点では、これを修正するために何をすべきかわからない。Cantはherokuに展開する

これはgit push heroku masterを実行したときのエラー出力です。

Counting objects: 76, done. 
Delta compression using up to 8 threads. 
Compressing objects: 100% (69/69), done. 
Writing objects: 100% (76/76), 21.53 KiB | 0 bytes/s, done. 
Total 76 (delta 2), reused 0 (delta 0) 
remote: Compressing source files... done. 
remote: Building source: 
remote: 
remote: -----> Ruby app detected 
remote: -----> Compiling Ruby/Rails 
remote: -----> Using Ruby version: ruby-2.2.4 
remote: ###### WARNING: 
remote:  Removing `Gemfile.lock` because it was generated on Windows. 
remote:  Bundler will do a full resolve so native gems are handled properly. 
remote:  This may result in unexpected gem versions being used in your app. 
remote:  In rare occasions Bundler may not be able to resolve your dependencies at all. 
remote:  https://devcenter.heroku.com/articles/bundler-windows-gemfile 
remote: 
remote: -----> Installing dependencies using bundler 1.11.2 
remote:  Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 
remote:  Fetching gem metadata from https://rubygems.org/........... 
remote:  Fetching version metadata from https://rubygems.org/... 
remote:  Fetching dependency metadata from https://rubygems.org/.. 
remote:  Resolving dependencies..... 
remote:  Installing json 1.8.3 with native extensions 
remote:  Installing rake 11.1.2 
remote:  Installing i18n 0.7.0 
remote:  Installing minitest 5.9.0 
remote:  Installing thread_safe 0.3.5 
remote:  Installing builder 3.2.2 
remote:  Installing erubis 2.7.0 
remote:  Installing mini_portile2 2.0.0 
remote:  Installing rack 1.6.4 
remote:  Installing mime-types-data 3.2016.0221 
remote:  Installing arel 6.0.3 
remote:  Using bundler 1.11.2 
remote:  Installing execjs 2.6.0 
remote:  Installing coffee-script-source 1.10.0 
remote:  Installing sass 3.4.22 
remote:  Installing thor 0.19.1 
remote:  Installing concurrent-ruby 1.0.2 
remote:  Installing multi_json 1.12.0 
remote:  Installing tilt 2.0.4 
remote:  Installing sqlite3 1.3.11 with native extensions 
remote:  Installing tzinfo 1.2.2 
remote:  Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 
remote:  /tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160517-323-1j0opc8.rb extconf.rb 
remote:  checking for sqlite3.h... no 
remote:  sqlite3.h is missing. Try 'port install sqlite3 +universal', 
remote:  'yum install sqlite-devel' or 'apt-get install libsqlite3-dev' 
remote:  and check your shared library search path (the 
remote:  location where your sqlite3 shared library is located). 
remote:  *** extconf.rb failed *** 
remote:  Could not create Makefile due to some reason, probably lack of necessary 
remote:  libraries and/or headers. Check the mkmf.log file for more details. You may 
remote:  need configuration options. 
remote:  Provided configuration options: 
remote:  --with-opt-dir 
remote:  --without-opt-dir 
remote:  --with-opt-include 
remote:  --without-opt-include=${opt-dir}/include 
remote:  --with-opt-lib 
remote:  --without-opt-lib=${opt-dir}/lib 
remote:  --with-make-prog 
remote:  --without-make-prog 
remote:  --srcdir=. 
remote:  --curdir 
remote:  --ruby=/tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME) 
remote:  --with-sqlite3-dir 
remote:  --without-sqlite3-dir 
remote:  --with-sqlite3-include 
remote:  --without-sqlite3-include=${sqlite3-dir}/include 
remote:  --with-sqlite3-lib 
remote:  --without-sqlite3-lib=${sqlite3-dir}/lib 
remote:  extconf failed, exit code 1 
remote:  Gem files will remain installed in /tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection. 
remote:  Results logged to /tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out 
remote:  Installing nokogiri 1.6.7.2 with native extensions 
remote:  Installing rdoc 4.2.2 
remote:  Installing mime-types 3.0 
remote:  Installing rack-test 0.6.3 
remote:  Installing autoprefixer-rails 6.3.6.1 
remote:  Installing uglifier 3.0.0 
remote:  Installing coffee-script 2.4.1 
remote:  Installing sprockets 3.6.0 
remote:  Installing activesupport 4.2.6 
remote:  An error occurred while installing sqlite3 (1.3.11), and Bundler cannot 
remote:  continue. 
remote:  Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling. 
remote:  Bundler Output: Fetching gem metadata from https://rubygems.org/........... 
remote:  Fetching version metadata from https://rubygems.org/... 
remote:  Fetching dependency metadata from https://rubygems.org/.. 
remote:  Resolving dependencies..... 
remote:  Installing json 1.8.3 with native extensions 
remote:  Installing rake 11.1.2 
remote:  Installing i18n 0.7.0 
remote:  Installing minitest 5.9.0 
remote:  Installing thread_safe 0.3.5 
remote:  Installing builder 3.2.2 
remote:  Installing erubis 2.7.0 
remote:  Installing mini_portile2 2.0.0 
remote:  Installing rack 1.6.4 
remote:  Installing mime-types-data 3.2016.0221 
remote:  Installing arel 6.0.3 
remote:  Using bundler 1.11.2 
remote:  Installing execjs 2.6.0 
remote:  Installing coffee-script-source 1.10.0 
remote:  Installing sass 3.4.22 
remote:  Installing thor 0.19.1 
remote:  Installing concurrent-ruby 1.0.2 
remote:  Installing multi_json 1.12.0 
remote:  Installing tilt 2.0.4 
remote:  Installing sqlite3 1.3.11 with native extensions 
remote:  Installing tzinfo 1.2.2 
remote: 
remote:  Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 
remote: 
remote:  /tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160517-323-1j0opc8.rb extconf.rb 
remote:  checking for sqlite3.h... no 
remote:  sqlite3.h is missing. Try 'port install sqlite3 +universal', 
remote:  'yum install sqlite-devel' or 'apt-get install libsqlite3-dev' 
remote:  and check your shared library search path (the 
remote:  location where your sqlite3 shared library is located). 
remote:  *** extconf.rb failed *** 
remote:  Could not create Makefile due to some reason, probably lack of necessary 
remote:  libraries and/or headers. Check the mkmf.log file for more details. You may 
remote:  need configuration options. 
remote: 
remote:  Provided configuration options: 
remote:  --with-opt-dir 
remote:  --without-opt-dir 
remote:  --with-opt-include 
remote:  --without-opt-include=${opt-dir}/include 
remote:  --with-opt-lib 
remote:  --without-opt-lib=${opt-dir}/lib 
remote:  --with-make-prog 
remote:  --without-make-prog 
remote:  --srcdir=. 
remote:  --curdir 
remote:  --ruby=/tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME) 
remote:  --with-sqlite3-dir 
remote:  --without-sqlite3-dir 
remote:  --with-sqlite3-include 
remote:  --without-sqlite3-include=${sqlite3-dir}/include 
remote:  --with-sqlite3-lib 
remote:  --without-sqlite3-lib=${sqlite3-dir}/lib 
remote: 
remote:  extconf failed, exit code 1 
remote: 
remote:  Gem files will remain installed in /tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection. 
remote:  Results logged to /tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out 
remote:  Installing nokogiri 1.6.7.2 with native extensions 
remote:  Installing rdoc 4.2.2 
remote:  Installing mime-types 3.0 
remote:  Installing rack-test 0.6.3 
remote:  Installing autoprefixer-rails 6.3.6.1 
remote:  Installing uglifier 3.0.0 
remote:  Installing coffee-script 2.4.1 
remote:  Installing sprockets 3.6.0 
remote:  Installing activesupport 4.2.6 
remote:  An error occurred while installing sqlite3 (1.3.11), and Bundler cannot 
remote:  continue. 
remote:  Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling. 
remote: ! 
remote: !  Failed to install gems via Bundler. 
remote: ! 
remote: !  Detected sqlite3 gem which is not supported on Heroku. 
remote: !  https://devcenter.heroku.com/articles/sqlite3 
remote: ! 
remote: 
remote: !  Push rejected, failed to compile Ruby app 
remote: 
remote: Verifying deploy... 
remote: 
remote: !  Push rejected to protected-thicket-11161. 
remote: 
To https://git.heroku.com/protected-thicket-11161.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'https://git.heroku.com/protected-thicket-11161.git' 

、これが私のGemfile

source 'https://rubygems.org' 
ruby '2.2.4' 


gem 'rails', '4.2.6' 
gem 'sass-rails', '~> 5.0' 
gem 'bootstrap-sass', '3.2.0.2' 
gem 'uglifier', '>= 1.3.0' 
gem 'coffee-rails', '~> 4.1.0' 
gem 'jquery-rails' 
gem 'turbolinks' 
gem 'jbuilder', '~> 2.0' 
gem 'sdoc', '~> 0.4.0',   group: :doc 
gem 'spring',  group: :development 
gem 'puma' 
gem 'pg' 

group :development, :test do 
    gem 'byebug' 
end 

group :development do 
    gem 'web-console', '~> 2.0' 
    gem 'sqlite3' 
end 

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 

である私は他の質問を見ているとその解決策のどれも私を助けてくれありませんでした。うまくいけば、私はstackoverflowでここで何をすべきかについていくつかの洞察を得ることができます。これはまた、テストだけで宝石を削除して、もう一度コードを展開しようとするために、問題を引き起こす可能性がありますよう

おかげ

+0

はこの事を試してみてください。 は1 - 宝石(再試行してください) 2 --systemを更新 - あなたのgemfile.lock上の任意のsqlite3の情報を取り、再び 3を試してみてください - あなたのgemfile.lockを削除し、取りますgemfileからsqlite3を取り出してもう一度やり直してください どちらかがうまくいきます – Boltz0r

答えて

0

は、sqlite3の依存関係を有していてもよく、他の宝石のためにあなたにGemfile.lockを確認してください。

1

remote: Removing 'Gemfile.lock' because it was generated on Windows.

この行は、おそらくあなたの苦境とは何かを持っています。 Windowsマシンで開発していますか?

Heroku documentation on this issue.

+0

はい私はWindowsであればどうすればいいのですか? –

+0

gemfileからsqlite3の行を完全に削除し、ヒロク。私の疑問は、herokuがgemfile.lockを破棄していて、開発グループにいても何とかsqlite3を引っ張っているということです。私は前にWindows上で開発したことはないし、私は以前にこの問題を見たことがない。 Gemfileを変更した後、インストールをバンドルして結果をコミットし、プッシュアップしてください。 –