views:

106

answers:

1

Here is my Gem Environment:

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.5
  - RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
  - INSTALLATION DIRECTORY: /var/lib/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /var/lib/gems/1.8
     - /home/haonanzhang/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/

I want to install taps to export a database from Heroku.

But when I run sudo gem install taps, I get the following error.

ERROR:  Error installing taps:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
extconf.rb:3:in `require': no such file to load -- mkmf (LoadError)
        from extconf.rb:3

Any suggestions?

Thanks.

+1  A: 

I had this same exact error after my mac crashed. I didn't want to use win so I loaded Ubuntu on my win box and got everything up and going in 5 hours.

You need to go into readline and execute a make file. I also highly suggest you use rvm to manage your gems and ruby versions. You can switch between gems and versions which you will probably need to do in this exact scenario .

  1. cd ruby/version/ext/redline
  2. ruby extconf.rb
  3. make
  4. sudo make install

Make sure you replace version with your ruby version and fill in the appropriate path for ruby.

Another known issue and this is the ruby version which is why rvm is a wonderful resource to switch between gem and ruby versions. ruby 1.9.1 has problems with taps and AFAIK Ubuntu, possible other OSs too.

After I ran the make file as explained above I had to switch ruby version to 1.8.7 to get taps to pull the data from herkou and then switch back to 1.9.1 for development. I never had this problem on mac FYI.

Sam