Enrique Moreno Tent
Enrique Moreno Tent

Reputation: 25307

Failure at "bundle-install"

I am trying to work on a new project on Ubuntu. After cloning the GitHub repo and installing ruby sudo apt-get install ruby, y perform

bundle install

and I get this feedback:

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

What am I missing?

Upvotes: 0

Views: 214

Answers (1)

James
James

Reputation: 4737

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

Then bundle install again.

As an aside you probably want to not mess with the system ruby and install ruby locally instead with rbenv or rvm.

Upvotes: 1

Related Questions