无法在MAC OS上安装RUBY Gem Twitter

时间:2017-07-12 16:33:51

标签: ruby macos twitter makefile rubygems

我在尝试在MAC OS上安装gem twitter时遇到问题。

我输入命令sudo gem install twitter

并得到以下结果:

Building native extensions.  This could take a while...
ERROR:  Error installing twitter:

ERROR: Failed to build gem native extension.

current directory: /Users/Will/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
/Users/Will/.rvm/rubies/ruby-2.3.3/bin/ruby -r ./siteconf20170712-36084-peffuw.rb extconf.rb

creating Makefile

current directory: /Users/Will/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean
/usr/local/bin/make:23:in `load': cannot load such file -- /Library/Ruby/Gems/2.0.0/gems/make-0.3.1/bin/make (LoadError)
    from /usr/local/bin/make:23:in `<main>'

current directory: /Users/Will/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
/usr/local/bin/make:23:in `load': cannot load such file -- /Library/Ruby/Gems/2.0.0/gems/make-0.3.1/bin/make (LoadError)
    from /usr/local/bin/make:23:in `<main>'

make failed, exit code 1

Gem files will remain installed in /Users/Will/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to /Users/Will/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0/http_parser.rb-0.6.0/gem_make.out

我已经尝试过网络上的东西(安装了XCode命令行工具,重新安装了Ruby和rvm ......),我想要搜索的所有想法/解决方案/地点......

你能帮我吗?

谢谢你们:)

1 个答案:

答案 0 :(得分:0)

看起来make正在尝试从默认的ruby中加载东西:/Library/Ruby/Gems/2.0.0/gems/make-0.3.1/bin/make (LoadError)而不是从你的rvm安装的ruby加载。我尝试使用gem install make安装make gem来查看是否能解决您的问题。

您还可以检查GEM_PATH环境变量,以确保在为rvm ruby​​安装gem之前未使用本地gem。