Ruby on Rails - Using LogServer for Remote Logging in log4r using ROMP

365 views Asked by At

I am a complete newbie in working with a Ruby on Rails (RoR) application. I am trying to set up a LogServer and tried running the example available on github : https://github.com/colbygk/log4r/blob/master/examples/logserver.rb and the https://github.com/colbygk/log4r/blob/master/examples/logclient.rb.

But I knew that ROMP was required for setting up a LogServer, so I downloaded the ROMP tarball and expanded it here : /usr/lib/ruby/1.8

But still when I tried running the logserver.rb program in the terminal, I get :

"/usr/lib/ruby/1.8/log4r/configurator.rb:204:in new': LogServer not supported. ROMP is required (RuntimeError) from /usr/lib/ruby/1.8/log4r/configurator.rb:204:indecode_logserver' ...."

Any idea on how to properly install ROMP on my machine??? I am using Ubuntu 10.04, ruby1.8 and rails 2.2.3.

Thanks in Advance ........

1

There are 1 answers

2
Siwei On BEST ANSWER

From this link: http://www.ruby-forum.com/topic/103958

After downloading and extracting the ROMP tarball ...

cd romp-0.2
ruby extconf.rb
make

This will compile the ROMP C extension. Now you need to install it into your ruby directory. On my Windows/Cygwin bastard box this is found in ...

/lib/ruby/site_ruby/1.8

The ROMP .rb files go directly into this directory, and the compiled .so goes into the

/lib/ruby/site_ruby/1.8/i386-cygwin

directory.

Please note that I have not tried this installation myself, but I hope you get the general idea