2014-07-24 32 views
1

安裝tiny_tds這是怎麼看我的Gemfile:從推動應用的Heroku輸出不能推應用程序的Heroku - 無法通過捆紮機

source :rubygems 
gem 'sinatra' 
gem 'json' 
gem 'tiny_tds' 

-----> Ruby app detected 
-----> Compiling Ruby/Rack 
-----> Using Ruby version: ruby-2.0.0 
-----> Installing dependencies using 1.6.3 
     Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment 
     The source :rubygems is deprecated because HTTP requests are insecure. 
     Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not. 
     Fetching gem metadata from http://rubygems.org/.......... 
     Fetching additional metadata from http://rubygems.org/.. 
     Installing rack 1.5.2 
     Using bundler 1.6.3 
     Installing sinatra 1.0 
     Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 
     /tmp/build_57173bf8-9a1a-4b28-8b51-57ba286f69b3/vendor/ruby-2.0.0/bin/ruby extconf.rb 
     checking for iconv_open() in iconv.h... yes 
     checking for sybfront.h... no 
     ----- 
     freetds is missing. 
     ----- 
     *** 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_57173bf8-9a1a-4b28-8b51-57ba286f69b3/vendor/ruby-2.0.0/bin/ruby 
     --enable-lookup 
     --disable-lookup 
     --with-iconv-dir 
     --without-iconv-dir 
     --with-iconv-include 
     --without-iconv-include=${iconv-dir}/include 
     --with-iconv-lib 
     --without-iconv-lib=${iconv-dir}/ 
     --with-freetds-dir 
     --without-freetds-dir 
     --with-freetds-include 
     --without-freetds-include=${freetds-dir}/include 
     --with-freetds-lib 
     --without-freetds-lib=${freetds-dir}/ 
     Gem files will remain installed in /tmp/build_57173bf8-9a1a-4b28-8b51-57ba286f69b3/vendor/bundle/ruby/2.0.0/gems/tiny_tds-0.6.2 for inspection. 
     Results logged to /tmp/build_57173bf8-9a1a-4b28-8b51-57ba286f69b3/vendor/bundle/ruby/2.0.0/gems/tiny_tds-0.6.2/ext/tiny_tds/gem_make.out 
     Installing json 1.8.1 
     An error occurred while installing tiny_tds (0.6.2), and Bundler cannot 
     continue. 
     Make sure that `gem install tiny_tds -v '0.6.2'` succeeds before bundling. 
     Bundler Output: The source :rubygems is deprecated because HTTP requests are insecure. 
     Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not. 
     Fetching gem metadata from http://rubygems.org/.......... 
     Fetching additional metadata from http://rubygems.org/.. 
     Installing rack 1.5.2 
     Using bundler 1.6.3 
     Installing sinatra 1.0 

     Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

     /tmp/build_57173bf8-9a1a-4b28-8b51-57ba286f69b3/vendor/ruby-2.0.0/bin/ruby extconf.rb 
     checking for iconv_open() in iconv.h... yes 
     checking for sybfront.h... no 
     ----- 
     freetds is missing. 
     ----- 
     *** 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_57173bf8-9a1a-4b28-8b51-57ba286f69b3/vendor/ruby-2.0.0/bin/ruby 
     --enable-lookup 
     --disable-lookup 
     --with-iconv-dir 
     --without-iconv-dir 
     --with-iconv-include 
     --without-iconv-include=${iconv-dir}/include 
     --with-iconv-lib 
     --without-iconv-lib=${iconv-dir}/ 
     --with-freetds-dir 
     --without-freetds-dir 
     --with-freetds-include 
     --without-freetds-include=${freetds-dir}/include 
     --with-freetds-lib 
     --without-freetds-lib=${freetds-dir}/ 

     Gem files will remain installed in /tmp/build_57173bf8-9a1a-4b28-8b51-57ba286f69b3/vendor/bundle/ruby/2.0.0/gems/tiny_tds-0.6.2 for inspection. 
     Results logged to /tmp/build_57173bf8-9a1a-4b28-8b51-57ba286f69b3/vendor/bundle/ruby/2.0.0/gems/tiny_tds-0.6.2/ext/tiny_tds/gem_make.out 
     Installing json 1.8.1 
     An error occurred while installing tiny_tds (0.6.2), and Bundler cannot 
     continue. 
     Make sure that `gem install tiny_tds -v '0.6.2'` succeeds before bundling. 
!  Failed to install gems via Bundler. 

在我的本地運行完美。我嘗試刪除存儲庫並創建一個新的,或重新啓動heroku。我如何在heroku上安裝tiny_tds?哪裏不對?

EDIT 25 /月/ 14

這個錯誤是因爲你的賽道是缺乏freetds的庫。 使用這樣的庫需要使用定製的buildpack。互聯網上有很多開源的buildpack。例如https://github.com/firmhouse/heroku-buildpack-ruby-freetds

TNX到達明(Heroku的支持)

回答

0

我會採取一種猜測,你有使用C編譯開關在本地計算機上安裝的寶石TinyTDS而是通過捆紮機沒有規定。您是否在本地主機上安裝了沙盒?例如

bundle install --binstubs --path=vendor 

看看是否有效。我猜測它會失敗,因爲現在除了項目之外沒有其他寶石可以訪問。然後使用bundle config安裝FreeTDS使用the build switches suggested in the TinyTDS README

相關問題