部署Rails应用程序时Heroku错误

时间:2014-05-27 16:41:03

标签: ruby-on-rails-3 heroku

我需要以下错误的帮助。我试图在Heroku上部署Rails 4应用程序..

似乎无法安装宝石。我可以这样做吗?

我试图用一些"谷歌搜索"来解决这个问题。解决方案似乎没有任何效果。是的,我已将sqlite和postgresql放在gemfile(生产/开发)中的正确组中。

有什么想法吗?


以下是部署时的bash过程:

   Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment

   Fetching gem metadata from https://rubygems.org/..........

   Fetching additional metadata from https://rubygems.org/..

   Installing i18n (0.6.9)
   Installing multi_json (1.9.2)
   Installing minitest (4.7.5)
   Installing rake (10.3.1)
   Installing builder (3.1.4)
   Installing thread_safe (0.3.3)
   Installing erubis (2.7.0)
   Installing tzinfo (0.3.39)
   Installing mime-types (1.25.1)
   Installing rack (1.5.2)
   Installing polyglot (0.3.4)
   Installing activerecord-deprecated_finders (1.0.3)
   Installing arel (4.0.2)
   Installing coffee-script-source (1.7.0)
   Installing execjs (2.0.2)
   Installing chunky_png (1.3.1)
   Installing thor (0.19.1)
   Installing commonjs (0.2.7)
   Installing orm_adapter (0.5.0)
   Installing hike (1.2.3)
   Installing bcrypt (3.1.7)
   Installing json (1.8.1)
   Using bundler (1.5.2)
   Installing libv8 (3.16.14.3)
   Installing tilt (1.4.1)
   Installing rails_serve_static_assets (0.0.2)
   Installing rails_stdout_logging (0.0.3)
   Installing ref (1.0.5)
   Installing sass (3.2.19)
   Installing activesupport (4.0.2)
   Installing rack-test (0.6.2)
   Installing warden (1.2.3)
   Installing treetop (1.4.15)
   Installing coffee-script (2.2.0)
   Installing rdoc (4.1.1)
   Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
   /tmp/build_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/ruby-2.0.0/bin/ruby extconf.rb
   checking for sndfile.h in /opt/local/include,/usr/local/include,C:/Program Files (x86)/Mega-Nerd/libsndfile/include,C:/Program Files/Mega-Nerd/libsndfile/include... no
   checking for sf_open() in -lsndfile-1... no
   checking for sf_open() in -lsndfile... no
   *** 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_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/ruby-2.0.0/bin/ruby
   --with-sndfile-dir
   --without-sndfile-dir
   --with-sndfile-include
   --without-sndfile-include=${sndfile-dir}/include
   --with-sndfile-lib
   --without-sndfile-lib=${sndfile-dir}/
   --with-sndfile-1lib
   --without-sndfile-1lib
   --with-sndfilelib
   --without-sndfilelib
   extconf.rb:21:in `<main>':   Can't find libsndfile (http://www.mega-nerd.com/libsndfile/) (RuntimeError)
   Try passing --with-sndfile-dir or --with-sndfile-lib and --with-sndfile-include
   options to extconf. If there are spaces in the path on windows, it may not work.
   Gem files will remain installed in /tmp/build_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/bundle/ruby/2.0.0/gems/ruby-audio-1.6.1 for inspection.
   Results logged to /tmp/build_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/bundle/ruby/2.0.0/gems/ruby-audio-1.6.1/ext/rubyaudio_ext/gem_make.out
   Installing uglifier (2.5.0)
   Installing less (2.5.0)
   Installing pg (0.17.1)
   An error occurred while installing ruby-audio (1.6.1), and Bundler cannot
   continue.
   Make sure that `gem install ruby-audio -v '1.6.1'` succeeds before bundling.
   Bundler Output: Fetching gem metadata from https://rubygems.org/..........
   Fetching additional metadata from https://rubygems.org/..
   Installing i18n (0.6.9)
   Installing multi_json (1.9.2)
   Installing minitest (4.7.5)
   Installing rake (10.3.1)
   Installing builder (3.1.4)
   Installing thread_safe (0.3.3)
   Installing erubis (2.7.0)
   Installing tzinfo (0.3.39)
   Installing mime-types (1.25.1)
   Installing rack (1.5.2)
   Installing polyglot (0.3.4)
   Installing activerecord-deprecated_finders (1.0.3)
   Installing arel (4.0.2)
   Installing coffee-script-source (1.7.0)
   Installing execjs (2.0.2)
   Installing chunky_png (1.3.1)
   Installing thor (0.19.1)
   Installing commonjs (0.2.7)
   Installing orm_adapter (0.5.0)
   Installing hike (1.2.3)
   Installing bcrypt (3.1.7)
   Installing json (1.8.1)
   Using bundler (1.5.2)
   Installing libv8 (3.16.14.3)
   Installing tilt (1.4.1)
   Installing rails_serve_static_assets (0.0.2)
   Installing rails_stdout_logging (0.0.3)
   Installing ref (1.0.5)
   Installing sass (3.2.19)
   Installing activesupport (4.0.2)
   Installing rack-test (0.6.2)
   Installing warden (1.2.3)
   Installing treetop (1.4.15)
   Installing coffee-script (2.2.0)
   Installing rdoc (4.1.1)

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

   /tmp/build_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/ruby-2.0.0/bin/ruby extconf.rb
   checking for sndfile.h in /opt/local/include,/usr/local/include,C:/Program Files (x86)/Mega-Nerd/libsndfile/include,C:/Program Files/Mega-Nerd/libsndfile/include... no
   checking for sf_open() in -lsndfile-1... no
   checking for sf_open() in -lsndfile... no
   *** 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_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/ruby-2.0.0/bin/ruby
   --with-sndfile-dir
   --without-sndfile-dir
   --with-sndfile-include
   --without-sndfile-include=${sndfile-dir}/include
   --with-sndfile-lib
   --without-sndfile-lib=${sndfile-dir}/
   --with-sndfile-1lib
   --without-sndfile-1lib
   --with-sndfilelib
   --without-sndfilelib
   extconf.rb:21:in `<main>':   Can't find libsndfile (http://www.mega-nerd.com/libsndfile/) (RuntimeError)

   Try passing --with-sndfile-dir or --with-sndfile-lib and --with-sndfile-include
   options to extconf. If there are spaces in the path on windows, it may not work.


   Gem files will remain installed in /tmp/build_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/bundle/ruby/2.0.0/gems/ruby-audio-1.6.1 for inspection.
   Results logged to /tmp/build_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/bundle/ruby/2.0.0/gems/ruby-audio-1.6.1/ext/rubyaudio_ext/gem_make.out
   Installing uglifier (2.5.0)
   Installing less (2.5.0)
   Installing pg (0.17.1)
   An error occurred while installing ruby-audio (1.6.1), and Bundler cannot
   continue.
   Make sure that `gem install ruby-audio -v '1.6.1'` succeeds before bundling.

   Failed to install gems via Bundler.
   Push rejected, failed to compile Ruby app

   To git@heroku.com:quiet-waters-5319.git
   [remote rejected] master -> master (pre-receive hook declined)
   error: failed to push some refs to 'git@heroku.com:quiet-waters-5319.git'

1 个答案:

答案 0 :(得分:0)

似乎heroku无法构建所需ruby-audio的原生部分。快速搜索“ruby-audio heroku”后,我发现了这个:https://github.com/khurramzaman/ruby-audio-heroku

相关问题