1

提前感谢您的帮助。我已经被这个问题困扰了几天了,绝对可以使用一些帮助。

我目前正在尝试部署我的应用程序,并且我正在使用 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

4 回答 4

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 ~ $

如果您想将此添加到多个环境,您也可以通过自定义厨师添加它

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 支持打开票证,以获得更复杂案例的帮助。

于 2014-01-02T20:59:21.027 回答
1

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

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

于 2014-07-08T17:09:06.747 回答
0

taglib-heroku gem看起来可以工作。

于 2012-08-20T22:12:05.517 回答
0

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

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

如果您不确定,这里是您如何使用自定义 buildpack。

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

于 2014-01-02T19:54:15.173 回答