gem install autotest-fsevent failing after update

2019-05-18 10:43发布

问题:

After update to Maveriks having problems installing gem autotest-fsevent

Here is the error I get;

Mellon:public lasdolphin$ sudo gem install autotest-fsevent
Building native extensions.  This could take a while...
ERROR:  Error installing autotest-fsevent:
ERROR: Failed to build gem native extension.

/Users/lasdolphin/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
    extconf.rb:24:in `<main>': Darwin 13 is not (yet) supported (RuntimeError)


Gem files will remain installed in /Users/lasdolphin/.rvm/rubies/ruby-1.9.3-        p448/lib/ruby/gems/1.9.1/gems/autotest-fsevent-0.2.8 for inspection.
Results logged to /Users/lasdolphin/.rvm/rubies/ruby-1.9.3-        p448/lib/ruby/gems/1.9.1/gems/autotest-fsevent-0.2.8/ext/fsevent/gem_make.out

Any idea why this is happening?

回答1:

This has been fixed in version 0.2.9 of autotest-fsevent

It fails because of the following line in autotest-fsevent:

SDK_VERSION = { 9 => '10.5', 10 => '10.6', 11 => '10.7', 12 => '10.8' }[DARWIN_VERSION]

Notice that there is no entry for Mavericks (10.9). You can temporarily fork the autotest-fsevent repo on github and add in the necessary entry for Mavericks:

13 => '10.9'

which seems to at least let it build. Then refer to your fork in your gemfile:

gem 'autotest-fsevent', git: 'https://github.com/your-username/autotest-fsevent'

If you're not using bundler, install the gem from the branch directly.



回答2:

  1. Upgrade XCode from 5.0 to 5.0.1
  2. Install the latest Command Line Tools (OS X Mavericks) for Xcode - Late October 2013
  3. Rebuild your ruby (in my case, I use rbenv, so I run rbenv install 2.0.0-p247)

The above steps solve my problem, hope it help!



回答3:

I try to install the "Comand line tools (OS X Maveriks)" from XCode and from the site, without success.

In another post I found the workable solution for me, I found this command:

xcode-select --install

This command download and install the command line tools in the right way I guess.

After that, I can install all my new gems without problem.