简体   繁体   中英

Taglib - Ruby - Deployment - Keep getting bundle error - extconf.rb failed

thanks for any help in advance. I've been stuck on this problem for a couple of days now and could definitely use some help.

I'm currently trying to deploy my app and I'm using the taglib-ruby gem and works perfectly on my local machine. But when I try to deploy via Heroku OR Engineyard, I get the following error:

    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.

What could I possibly be doing wrong? I'm thinking maybe there is a way to send this library with my application for deployment?

My gemfile is this:

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

Again, thank you, and if there is any information I can provide to help solve this issue, please let me know.

On the Engineyard stack, you just need to add the media-libs/taglib to your package list for the gem to use. We don't install taglib by default on the AMI.

You can do this via the dashboard ( https://support.cloud.engineyard.com/entries/21074071-Add-UNIX-Packages-to-Your-Application ), just search for taglib and select media-libs/taglib from the list.

If you want to do this on the command line for a test:

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

You can also add this via Custom Chef if you want to add this to multiple environments

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

Finally, you can install media-libs/taglib-extras if you want support for the extra taglib-extras proprietary file formats.

Many gems with native extensions require base libraries to be installed. Most of them can be added like this and you can open a ticket with Engine Yard support for help with more complex cases.

for deploying taglib to heroku... please follow this tutorial I wrote after being stuck in this issue for a while...

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

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

I solved this problem by creating a custom buildpack with heroku. Use it to install taglib with no problems.

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

here is how you use the custom buildpack if you're unsure.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM