applidium/Cracking-Siri

Problem with 'eventmachine' when running siriServer.rb

Opened this issue · 3 comments

I use RVM, so I removed the

#!/usr/bin/env ruby

and replaced with

#!/Users/nybras/.rvm/rubies/ruby-1.9.2-head/bin/ruby

when I try to run it with sudo I get this, even I have the 'event machine' gem properly installed

sudo ruby siriServer.rb 
/Users/nybras/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- eventmachine (LoadError)
from /Users/nybras/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from siriServer.rb:2:in `<main>'

and without sudo

ruby siriServer.rb 
/Users/nybras/.rvm/gems/ruby-1.9.2-head/gems/eventmachine-0.12.10/lib/eventmachine.rb:572:in `start_tcp_server': no acceptor (RuntimeError)
from /Users/nybras/.rvm/gems/ruby-1.9.2-head/gems/eventmachine-0.12.10/lib/eventmachine.rb:572:in `start_server'
from siriServer.rb:73:in `block in <main>'
from /Users/nybras/.rvm/gems/ruby-1.9.2-head/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `call'
from /Users/nybras/.rvm/gems/ruby-1.9.2-head/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
from /Users/nybras/.rvm/gems/ruby-1.9.2-head/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
from siriServer.rb:72:in `<main>'

I dont know what to do from now on, I was following this tutorial:
http://f3v3r.com/2011/12/29/how-to-get-iphone-4s-siri-authentication-keys/

Hello,

I think you should install eventmachine gem
run this command
sudo gem install eventmachine

Sorry, I forgot to mention that I already have eventmachine installed.

[10:31][nybras@nybras-2:~]$ gem list | grep eventmachine
eventmachine (0.12.10)

[14:28][nybras@nybras-2:~]$ sudo gem list | grep eventmachine
Password:
eventmachine (0.12.10)

why not to keep the #!/usr/bin/env ruby
and run this instead
rvm use 1.9.2 --default
This should set you default ruby 1.9.2 if you have the ruby 1.9.2 already installed in the rvm
and to run the server using (rvmsudo ruby siriProxy.rb)
use rvmsudo not sudo
also when installing gems use rvmsudo gem install "the gem name"
This could help: http://www.stantheripper.com/siri/