0

私はこれが古い問題であることを知っており、同じ問題に関連する多くの質問を見ました。それでも同じエラーが発生し続けます。私は解決策に従い、それに応じてgemfileを変更しましたが、それでも同じ問題が発生します。私はubuntuを使用しています。以下は、MichaelHartlのチュートリアルで述べたようにgitpushherokumasterを実行したときの私の問題です。

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=/usr/local/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_t7ck4nq1x4dd/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6 for inspection.
       Results logged to /tmp/build_t7ck4nq1x4dd/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out
       An error occurred while installing sqlite3 (1.3.6), and Bundler cannot continue.
       Make sure that `gem install sqlite3 -v '1.3.6'` succeeds before bundling.
 !
 !     Failed to install gems via Bundler.
 !
 !     Heroku push rejected, failed to compile Ruby/rails app

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

これが私のGemfileです

source 'https://rubygems.org'

gem 'rails', '3.2.5'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

group :production do 
  gem 'pg'
end

group :development, :test do 
  gem 'sqlite3'
  gem 'taps'
  gem 'rvm'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'

助けてください

4

2 に答える 2

0

Gemfileからsqlite3を削除します。gemのみを使用して開発するpgため、デプロイ先とまったく同じデータベースシステムで開発できます。

これを行わないと、2つのデータベースシステム間を移行するときに問題が発生する可能性があります。

于 2012-07-09T02:07:01.833 に答える
0

Ryan Biggが言ったように、開発と本番の両方で同じ環境を使用する必要があります。そうすれば、後で本番環境にデプロイするときに驚きを感じることはありません。

しかし、それを気にせず、sqliteを使い続けたい場合は、を実行するだけでよいと思いますbundle install。GemFileを変更したと思いますが、バンドルインストールを実行していません。

于 2012-07-09T02:09:45.627 に答える