执行以下命令......
~$ sudo npm install -g ios-sim
...产量
\
> ios-sim@3.1.1 preinstall /usr/local/lib/node_modules/ios-sim
> rake build
/Users/jlivermore/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find rake (>= 0) amongst [] (Gem::LoadError)
from /Users/jlivermore/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/jlivermore/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
from /Users/jlivermore/.rvm/gems/ruby-1.9.3-p327@global/bin/rake:18:in `<main>'
from /Users/jlivermore/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/jlivermore/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `<main>'
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ios-sim"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! ios-sim@3.1.1 preinstall: `rake build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ios-sim@3.1.1 preinstall script 'rake build'.
npm ERR! This is most likely a problem with the ios-sim package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! rake build
npm ERR! You can get their info via:
npm ERR! npm owner ls ios-sim
npm ERR! There is likely additional logging output above.
正如其他帖子所述,我有以下内容......
~$ which rake
/Users/jlivermore/.rvm/gems/ruby-1.9.3-p327@global/bin/rake
~$ rake --version
rake, version 10.0.3
~$ gem list | grep rake
rake (10.0.3)
任何人都可以看到问题所在吗?
答案 0 :(得分:0)
请确保已安装xcode然后重试。我认为我的全新Mac默认会在那里使用它,但它没有。