将hitimes-gem作为Railsbundle的一部分安装时出错



我正在尝试安装一个Rails捆绑包,该捆绑包适用于我的2009 iMac和2012 MacBook Pro,但不适用于我朋友的2011 MacBook Pro。所有这些系统都在运行Mavericks,并安装了Xcode和最新的命令行工具(经过反复验证)。Bundler在安装hitimes和nokogiri时出现错误;命中时间错误在这里:

Installing hitimes (1.2.2) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/name/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb 
creating Makefile
make "DESTDIR="
compiling hitimes.c
compiling hitimes_instant_clock_gettime.c
compiling hitimes_instant_osx.c
compiling hitimes_instant_windows.c
compiling hitimes_interval.c
compiling hitimes_stats.c
linking shared-object hitimes/2.0/hitimes.bundle
ld: warning: directory not found for option '-L/Users/mpapis/.sm/pkg/active/lib'
ld: framework not found CoreServices
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [hitimes.bundle] Error 1
Gem files will remain installed in /Users/name/.rvm/gems/ruby-2.0.0-p247/gems/hitimes-1.2.2 for inspection.
Results logged to /Users/name/.rvm/gems/ruby-2.0.0-p247/gems/hitimes-1.2.2/ext/hitimes/c/gem_make.out
An error occurred while installing hitimes (1.2.2), and Bundler cannot continue.
Make sure that gem install hitimes -v '1.2.2' succeeds before bundling.

当我们尝试,正如它所建议的,"geminstallhitimes-v'1.2.2'",我们得到:

Building native extensions. This could take a while...
ERROR: Error installing hitimes:
ERROR: Failed to build gem native extension.
/Users/name/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
creating Makefile
make "DESTDIR="
compiling hitimes.c
compiling hitimes_instant_clock_gettime.c
compiling hitimes_instant_osx.c
compiling hitimes_instant_windows.c
compiling hitimes_interval.c
compiling hitimes_stats.c
linking shared-object hitimes/2.0/hitimes.bundle
ld: warning: directory not found for option '-L/Users/mpapis/.sm/pkg/active/lib'
ld: framework not found CoreServices
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [hitimes.bundle] Error 1

对我来说,这看起来我们仍然没有安装Xcode或命令行工具。但是,我们已经重新安装了这两个。可能是什么问题?

我看到过关于类似问题的帖子,但都没有包含决议。看看这里和这里。

当我们升级到Ruby 2.1.1时,这个问题自行解决了。

最新更新