“捆绑安装”失败

时间:2013-09-09 21:29:25

标签: ruby gem bundler

我正在尝试在Ubuntu上开发一个新项目。克隆GitHub仓库并安装ruby sudo apt-get install ruby之后,执行

bundle install

我得到了这个反馈:

$ bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.0.4) 
Using coderay (1.0.9) 
Using coffee-script-source (1.6.2) 
Using multi_json (1.7.2) 
Using execjs (1.4.0) 
Using coffee-script (2.2.0) 
Installing ffi (1.8.1) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
        /usr/bin/ruby1.9.1 extconf.rb 
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from extconf.rb:4:in `<main>'
Gem files will remain installed in /home/dbugger/.bundler/tmp/24874/gems/ffi-1.8.1 for inspection.
Results logged to /home/dbugger/.bundler/tmp/24874/gems/ffi-1.8.1/ext/ffi_c/gem_make.out
An error occurred while installing ffi (1.8.1), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.8.1'` succeeds before bundling.

我错过了什么?

1 个答案:

答案 0 :(得分:1)

尝试sudo apt-get install ruby1.9-dev

再次bundle install

顺便说一句,你可能不想搞乱系统ruby并在本地安装ruby而不是rbenvrvm