2015-05-04 55 views
0

我正在接觸形式的Rails應用程序,當試圖bundle install我得到了寶石,我從來沒有加入到Gemfile中的錯誤。一些神祕的curb gem缺少一些圖書館或其他東西。路沿石寶石打破了我的包安裝

我一直在尋求答案,但無法弄清楚他們在說什麼,因爲他們的平臺。我用Cloud9linux環境與rails 4.2.0

也許你們有一些想法如何解決這個問題?波紋管是完整的錯誤信息。

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150504-13714-unpe0g.rb extconf.rb checking for curl-config... no checking for main() in -lcurl... 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=/usr/local/rvm/rubies/ruby-2.1.5/bin/ruby --with-curl-dir --without-curl-dir --with-curl-include --without-curl-include=${curl-dir}/include --with-curl-lib --without-curl-lib=${curl-dir}/lib --with-curllib --without-curllib extconf.rb:18:in <main>': Can't find libcurl or curl/curl.h (RuntimeError) Try passing --with-curl-dir or --with-curl-lib and --with-curl-include options to extconf. extconf failed, exit code 1 Gem files will remain installed in /usr/local/rvm/gems/[email protected]/gems/curb-0.8.8 for inspection. Results logged to /usr/local/rvm/gems/[email protected]ls4/extensions/x86_64-linux/2.1.0/curb-0.8.8/gem_make.out An error occurred while installing curb (0.8.8), and Bundler cannot continue. Make sure that gem install curb -v '0.8.8'` succeeds before bundling.

這裏是我的gemfile

source 'https://rubygems.org' 

gem 'rails',  '4.2.0' 
gem 'sass',   '3.4.13' 
gem 'sass-rails', '5.0.1' 
gem 'uglifier',  '2.5.3' 
gem 'coffee-rails', '4.1.0' 
gem 'jquery-rails', '4.0.3' 
gem 'turbolinks', '2.3.0' 
gem 'jbuilder',  '2.2.3' 
gem 'sdoc',   '0.4.0', group: :doc 
gem 'mailgun-rails', '~> 0.1.1' 

group :development, :test do 
    gem 'sqlite3',  '1.3.9' 
    gem 'byebug',  '3.4.0' 
    gem 'web-console', '2.0.0.beta3' 
    gem 'spring',  '1.1.3' 
end 

group :test do 
    gem 'minitest-reporters', '1.0.5' 
    gem 'mini_backtrace',  '0.1.3' 
    gem 'guard-minitest',  '2.3.1' 
end 

group :production do 
    gem 'pg',    '0.17.1' 
    gem 'rails_12factor', '0.0.2' 
end 
+0

你可以發佈你的'gemfile'嗎? –

+0

我添加了gemfile – DanielsV

+0

添加'mailgun-rails'之前,你的包是否正常?也許嘗試將版本關閉,看看它是否安裝正確(使用最新版本)。如果這樣,你總是可以使用'bundle show'來查找版本,然後將它設置在你的gem文件中。 –

回答

1

嘗試刪除您Gemfile.lock文件位於旁邊的實際Gemfile,然後運行bundle install

如果失敗,你可以嘗試傾銷你目前gemlist(例如爆rvm),然後重新安裝它們。