[英]Taglib - Ruby - Deployment - Keep getting bundle error - extconf.rb failed
謝謝你提前幫助。 我已經堅持這個問題幾天了,肯定可以使用一些幫助。
我正在嘗試部署我的應用程序,我正在使用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
再次,謝謝,如果我能提供任何信息來幫助解決這個問題,請告訴我。
在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支持打開一張票,以獲得更復雜案例的幫助。
用於將taglib
部署到heroku ...請按照我在這個問題上堅持一段時間后寫的這個教程...
taglib-heroku gem看起來可能有效。
我通過使用heroku創建自定義buildpack解決了這個問題。 用它來安裝taglib沒有問題。
https://github.com/menan/heroku-buildpack-ruby.git
如果你不確定,這里是你如何使用自定義buildpack。
https://devcenter.heroku.com/articles/buildpacks#using-a-custom-buildpack
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.