I'm not very comfortable with jruby
and rvm
environments, so I have trouble trying to run logstash with it (it is said to be the fastest way to do so).
What I've tryed :
- I installed
rvm
environement (as a side note, the standard install scripts create a new .bash_profile
, which disable the standard .bashrc script when you're on Ubuntu. This can confuse new users like me... I was wondering for several hours why my 'll' alias won't work !)
- I uncompressed logstash (
jar xvf /logstash-1.1.4-monolithic.jar
) in a new directory
- I've followed the instructions in https://rvm.io/rvm/install/ as
rvm install 1.9.2
(albeit I've also made some try/error/redo manipulations, so I can't remember the exact listing of commands)
Then I tried several commands, but none of them worked :
$ ruby logstash.rb
/home/orabig/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- logstash/agent (LoadError)
from /home/orabig/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from logstash.rb:1:in `<main>'
whereas the following line is returning after some seconds :
jruby-1.7.0 logstash.rb agent -f ../etc/inout.config -v
(the inout.config file is working when invoked with the java commandline as in :)
java -jar (...)/logstash-1.1.4-monolithic.jar agent -f ../etc/inout.config -v
So I'm basically stuck now, because the more I will try random things, the more I'm afraid to mess up my configuration...
Update : On the logstash page (https://github.com/logstash/logstash), it looks like it's working with 1.6.8 ruby version (however it's not clear, and I'm not sure if it makes any difference...)
So I also tried :
$ rvm install 1.6.8
(...)
$ rvm use 1.6.8
$ export JRUBY_OPTS=--1.9
$ ruby logstash.rb agent -f ../etc/inout.config -v
$ jruby-1.6.8 logstash.rb agent -f ../etc/inout.config -v
but nothing happens when I run either of the last two lines...