Ionic IOS emulator fails

I run ‘ionic emulate ios’ and get the errors below. I run the suggested fix and I get a additional errors. As a side note I did get warnings about version of node.js that was expected but not found. Thanks for any assistance.

Error: ios-sim was not found. Please download, build and install version 3.0 or greater from into your path. Or ‘npm install -g ios-sim’ using node.js:
Error: /Users/samuel/myapp/platforms/ios/cordova/run: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Process.ChildProcess._handle.onexit (child_process.js:1080:5)

I guess you are on Windows. If not, would you mind sharing the other errors?

I running Mac OSX and here are the secondary error messages are:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:213:in ``': Permission denied - getcwd (Errno::EACCES)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:213:in `<module:RbConfig>'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:5:in `<top (required)>'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems.rb:8:in `require'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems.rb:8:in `<top (required)>'
	from <internal:gem_prelude>:1:in `require'
	from <internal:gem_prelude>:1:in `<compiled>'
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ios-sim"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1

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.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/samuel/myapp/www/js/npm-debug.log

So lets run over what you have at the moment.

OS: Mac OS X Yosemite
Node Version: v0.10.36
Cordova CLI: 4.2.0
Ionic CLI Version: 1.3.11
Xcode version: Xcode 6.1.1 Build version 6A2008a
ios-sim version: 3.1.1

This is what I have on my system, what about yours?

$ ionic info

Thanks for the tip the I solved the problem. I ran ‘ionic info’ and it showed that ios-sim wasn’t installed. Consequently I downloaded ios-sim switched to the source root, built and installed it and everything works now.