我试图在heroku中部署我的应用程序,但在安装其他宝石之后它会导致我这个错误
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/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=/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_2vzrh01g333bs/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6 for inspection.
Results logged to /tmp/build_2vzrh01g333bs/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out
An error occured 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:floating-journey-3614.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:floating-journey-3614.git'
[led@localhost djors]$ yum install sqlite-devel
Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit
You need to be root to perform this command.
我检查了yum install sqlite-devel
但已经安装了我试过google但没有任何问题来找我答案我在1.3.6
问题中发现问题提前感谢
- RUBYGEMS VERSION: 1.8.10
- RUBY VERSION: 1.9.3 (2011-09-23 patchlevel -1) [i686-linux]
- INSTALLATION DIRECTORY: /home/led/.rvm/gems/ruby-1.9.3-rc1
- RUBY EXECUTABLE: /home/led/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby
- EXECUTABLE DIRECTORY: /home/led/.rvm/gems/ruby-1.9.3-rc1/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /home/led/.rvm/gems/ruby-1.9.3-rc1
- /home/led/.rvm/gems/ruby-1.9.3-rc1@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://rubygems.org/", "http://gems.github.com"]
- REMOTE SOURCES:
- http://rubygems.org/
- http://gems.github.com
我的宝石文件
gem 'rails', '3.2.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'time_diff'
gem 'activemerchant', :require => 'active_merchant'
gem 'activeadmin' , '0.4.3'
gem "formtastic", "~> 2.1.1"
gem 'validates_overlap'
gem "nifty-generators"
gem 'thin'
group :production, :staging do
gem "pg"
end
group :development, :test do
gem "sqlite3-ruby", "~> 1.3.0", :require => "sqlite3"
end
gem "paperclip", "~> 3.0"
# 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'
gem "twitter-bootstrap-rails"
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer'
gem 'bourbon'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
答案 0 :(得分:1)
在此处检查您的 validates_overlap gem:
https://github.com/robinbortlik/validates_overlap/blob/master/validates_overlap.gemspec
它有s.add_runtime_dependency(%q<sqlite3>, [">= 0"])