Taglib - Ruby - 部署 - 继续获取bundle错误 - extconf.rb失败

时间:2012-08-12 10:17:48

标签: ruby-on-rails heroku taglib engineyard

感谢您提前提供任何帮助。我已经坚持了几天这个问题并且肯定可以使用一些帮助。

我正在尝试部署我的应用程序,我正在使用taglib-ruby gem并在我的本地计算机上完美运行。但是当我尝试通过Heroku OR Engineyard进行部署时,我收到以下错误:

    Installing taglib-ruby (0.5.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/bin/ruby19 extconf.rb 
checking for main() in -lstdc++... yes
checking for main() in -ltag... no
You must have taglib installed in order to use taglib-ruby.

Debian/Ubuntu: sudo apt-get install libtag1-dev
Fedora/RHEL: sudo yum install taglib-devel
Brew: brew install taglib
MacPorts: sudo port install taglib

*** 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
    --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/bin/ruby19
    --with-tag-dir
    --without-tag-dir
    --with-tag-include
    --without-tag-include=${tag-dir}/include
    --with-tag-lib
    --without-tag-lib=${tag-dir}/lib
    --with-stdc++lib
    --without-stdc++lib
    --with-taglib
    --without-taglib


Gem files will remain installed in /data/musicmind/shared/bundled_gems/ruby/1.9.1/gems/taglib-ruby-0.5.1 for inspection.
Results logged to /data/musicmind/shared/bundled_gems/ruby/1.9.1/gems/taglib-ruby-0.5.1/ext/taglib_base/gem_make.out
An error occured while installing taglib-ruby (0.5.1), and Bundler cannot continue.
Make sure that `gem install taglib-ruby -v '0.5.1'` succeeds before bundling.

我可能做错了什么?我想也许有办法用我的应用程序发送这个库进行部署?

我的gemfile是这样的:

source 'http://rubygems.org'

gem  'rails', '3.2.8'

# 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 'uglifier', '>= 1.0.3'
  gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
end

group :development, :test do
  gem 'sqlite3'
end
group :production do
  gem 'mysql2'
end

gem "taglib-ruby"

gem 'json', '~> 1.6.5'

gem "multi_json", "~> 1.3.6"

#attachment management
gem "paperclip", :git => "git://github.com/thoughtbot/paperclip.git"

#ativity feed
gem 'public_activity', :git => "git://github.com/pokonski/public_activity.git"

gem 'jquery-rails'

#nested-album-form
gem 'nested_form', :git => 'https://github.com/ryanb/nested_form.git'

#creates pattern for widget to send form data in json back to server
gem "js_message"

gem 'kaminari'

#gem 'will_paginate'


#user authentication
gem 'devise'

#notification - basic
gem 'unread'

#id3 tag reader for songs


gem 'libv8', '~> 3.11.8'

#admin interface
gem 'activeadmin'



#gravatar images for users with no profile picture
gem 'gravatar_image_tag'

#amazon s3 for song storage
gem 'aws-sdk'

#authentication for twitter
gem 'omniauth-twitter'

#pretty urls
gem 'friendly_id'

gem 'tire'

group :development do
  gem 'rspec-rails'
  gem 'nifty-generators'
  gem 'annotate'
  gem 'faker'
end

group :test do
  gem 'rspec-rails'
  gem 'webrat'
  gem 'spork', '~> 0.9.0.rc'
  gem 'factory_girl_rails'
  gem 'watchr'
end

#?
gem 'progress_bar'

#web intents - twitter
gem 'tweet-button'



#like buttons
gem 'facebook_share'

#rails paypal interfacing
gem 'activemerchant', :require => 'active_merchant'

#gem 'bootstrap-will_paginate'

gem 'bootstrap-kaminari-views'

gem 'omniauth-facebook'

gem 'simple_form'

gem 'country_select'

# gem 'tiny_tds'
# gem 'activerecord-sqlserver-adapter'
# gem 'ruby-odbc'

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

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

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
gem 'debugger'

group :test do
  # Pretty printed test output
  gem 'turn', :require => false
  gem 'minitest'
end
gem "mocha", :group => :test

再次,谢谢,如果我能提供任何信息来帮助解决这个问题,请告诉我。

4 个答案:

答案 0 :(得分:2)

在Engineyard堆栈上,您只需要将media-libs / taglib添加到包列表中以供gem使用。默认情况下,我们不会在AMI上安装taglib。

您可以通过仪表板(https://support.cloud.engineyard.com/entries/21074071-Add-UNIX-Packages-to-Your-Application)执行此操作,只需搜索taglib并从列表中选择media-libs / taglib。

如果要在命令行上执行此测试:

deploy@ip-10-66-7-217 ~ $ sudo emerge media-libs/taglib

Local copy of remote index is up-to-date and will be used.
 * Last emerge --sync was 1y 42d 54m 34s ago.
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) media-libs/taglib-1.7.2
>>> Downloading 'http://distfiles.gentoo.org/distfiles/taglib-1.7.2.tar.gz'
[[ Lots of build output clipped]]
-- Installing: /var/tmp/portage/media-libs/taglib-1.7.2/image/usr/include/taglib/tag_c.h
>>> Completed installing taglib-1.7.2 into /var/tmp/portage/media-libs/taglib-1.7.2/image/

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line
   usr/lib64/libtag.so.1.7.2
   usr/lib64/libtag_c.so.0.0.0
ecompressdir: bzip2 -9 /usr/share/doc

>>> Installing (1 of 1) media-libs/taglib-1.7.2

>>> Recording media-libs/taglib in "world" favorites file...
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

 * IMPORTANT: 2 config files in '/etc' need updating.
 * See the CONFIGURATION FILES section of the emerge
 * man page to learn how to update config files.
deploy@ip-10-66-7-217 ~ $ gem install taglib-ruby
Building native extensions.  This could take a while...
Successfully installed taglib-ruby-0.6.0
1 gem installed
deploy@ip-10-66-7-217 ~ $

如果要将其添加到多个环境

,也可以通过Custom Chef添加此项
component_version = "1.7.2"  # If your on the 2012.11 Stable-v4 stack, "1.5" if your in 2009a   

enable_package 'media-libs/taglib' do
  version component_version
end

package 'media-libs/taglib' do
  version component_version
  action :install
end

最后,如果您想要支持额外的taglib-extras专有文件格式,可以安装media-libs / taglib-extras。

许多具有本机扩展的gem需要安装基本库。其中大部分都可以像这样添加,您可以使用Engine Yard支持打开一张票,以获得更复杂案例的帮助。

答案 1 :(得分:1)

用于将taglib部署到heroku ...请按照我在这个问题上停留一段时间之后写的教程...

http://artmees.github.io/blog/2014/06/14/heroku-taglib/

答案 2 :(得分:0)

taglib-heroku gem看起来可能有效。

答案 3 :(得分:0)

我通过使用heroku创建自定义buildpack解决了这个问题。用它来安装taglib没有问题。

https://github.com/menan/heroku-buildpack-ruby.git

如果您不确定,请使用自定义构建包。

https://devcenter.heroku.com/articles/buildpacks#using-a-custom-buildpack