我一直在試圖推向Heroku,但這個錯誤阻止了我進一步前進。Heroku:Sqlite3失蹤
在開始的時候,它說: remote:Your Gemfile lists the gem sqlite3 (>= 0) more than once.
但事後:
remote: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
remote: /tmp/build_d6d0f05e8da9cbfba1689173eab3d2d0/vendor/ruby-2.0.0/bin/ruby 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_d6d0f05e8da9cbfba1689173eab3d2d0/vendor/ruby-2.0.0/bin/ruby
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}/
remote: Gem files will remain installed in /tmp/build_d6d0f05e8da9cbfba1689173eab3d2d0/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10 for inspection.
remote: Results logged to /tmp/build_d6d0f05e8da9cbfba1689173eab3d2d0/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10/ext/sqlite3/gem_make.out
remote: An error occurred while installing sqlite3 (1.3.10), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.10'` 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
我試圖安裝的Postgres並在Gemfile中這樣做:
gem 'sqlite3', group: [:development, :test]
gem 'pg', group: [:production]
沒有什麼工作,我開始放棄Rails ..
好哥們兒,冷靜下來..嘗試'捆綁安裝--without production'然後提交,然後更改終於推到Heroku的。讓我知道發生什麼事。 – Ojash
對於它的價值,我認爲用sqlite開發然後推到PostgreSQL是一個可怕的想法。我會從本地開發的Postgres.app開始。 –
@Ojash哦,我的天啊。這是工作!非常感謝!這是否意味着我每次嘗試推送時都必須「捆綁安裝 - 無需生產」? –