I installed the eventmachine rubygem with 'gem install eventmachine' and confirmed its installed by running jewel list --local also it turns up. I went setup.rb within the eventmachine directory too.

The next code

$:.push("/home2/sthoma5/ruby/gems")  // this was in the shared server docs

require 'rubygems'
require 'eventmachine'

module EchoServer  
   def receive_data(data)

EventMachine::run do
   host = ""
   port = 80
   EventMachine::start_server host, port, EchoServer
   puts "Started EchoServer on #{host}:#{port}"

Returns the mistake:

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_requi 
re': no such file to load -- eventmachine (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'                                               
from echo.rb:4

It appears I have to require this inside a non-standard way because I'm on the shared server and do not get access to certain ruby pathways? Via SSH I'm able to however navigate to /usr/lib/ruby/site_ruby/1.8/rubygems.

My eventmachine directory is under home2/sthoma5/ruby/gems/gems/eventmachine-.12.10.

Which version of Ruby are you currently running?

In Ruby 1.8.x, you have to require 'rubygems' first.