0

我正在尝试在 Ubuntu 上开展一个新项目。克隆 GitHub 存储库并安装 rubysudo 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.

我错过了什么?

4

1 回答 1

1

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

然后bundle install再一次。

顺便说一句,您可能不想弄乱系统 ruby​​ 并在本地安装 ruby​​,而不是使用rbenvrvm

于 2013-09-09T21:42:49.717 回答