Note that there are some explanatory texts on larger screens.

plurals
  1. POError installing gems that use native extensions on Ubuntu, Ruby 1.9.2 via RVM
    text
    copied!<p>I get an error while trying to install the ffi gem:</p> <pre><code>~ - 16:54&gt;gem i ffi Building native extensions. This could take a while... ERROR: Error installing ffi: ERROR: Failed to build gem native extension. rake RUBYARCHDIR=/home/mdemare/.rvm/gems/ruby-1.9.2-p136/gems/ffi-1.0.6/lib RUBYLIBDIR=/home/mdemare/.rvm/gems/ruby-1.9.2-p136/gems/ffi-1.0.6/lib /home/mdemare/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:370:in `bin_path': can't find gem rake (["&gt;= 0"]) with executable rake (Gem::GemNotFoundException) from /home/mdemare/.rvm/gems/ruby-1.9.2-p136/bin/rake:19:in `&lt;main&gt;' Gem files will remain installed in /home/mdemare/.rvm/gems/ruby-1.9.2-p136/gems/ffi-1.0.6 for inspection. Results logged to /home/mdemare/.rvm/gems/ruby-1.9.2-p136/gems/ffi-1.0.6/gen/gem_make.out </code></pre> <p>I'm getting frequent errors of all kinds while installing gems with native extensions, so I assume that there's something broken with my Ubuntu installation, but I've no idea what. I'll post any information you need to diagnose the problem.</p> <p>EDIT: When I cd to the ffi gem (mentioned in the second but last line), and run the rake line in line 6, I get "Could not find RubyGem rake-compiler".</p> <p>After gem i rake-compiler, and run rake again, I get this:</p> <pre><code>configure: error: source directory already configured; run "make distclean" there first make: *** [/home/mdemare/.rvm/gems/ruby-1.9.2-p136/gems/ffi-1.0.6/build/x86_64-linux/ffi_c/1.9.2/libffi/.libs/libffi_convenience.a] Error 1 rake aborted! Command failed with status (2): [make...] </code></pre> <p>Update:</p> <p>These are my rake gemspecs:</p> <pre><code>~ - 10:59&gt;find ~/.rvm/ -name 'rake-0.8.7.gemspec' ~/.rvm/gems/ruby-1.9.2-p136/specifications/rake-0.8.7.gemspec ~/.rvm/gems/ruby-1.9.2-p136@global/specifications/rake-0.8.7.gemspec ~/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/gems/1.9.1/specifications/rake-0.8.7.gemspec </code></pre> <p>The last one is where gem looks, but that gemspec is different from the first one, and doesn't include the executable. Copying the long one doesn't quite solve the problem though - I get a file not found for the rake executable.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload