Mithril Mithril - 4 months ago 86
Ruby Question

Logstash Unable to find JRuby

I download logstash 2.0.0 from here.
test output:

D:\logstash\bin>logstash -e 'input { stdin { } } output { stdout {} }'
Unable to find JRuby.
If you are a user, this is a bug.
If you are a developer, please run 'rake bootstrap'. Running 'rake' requires the 'ruby' program be available.


windows also alert me “how to open
.rb
", I have ruby installed, but not familiar with it.

Because it says "If you are a user, this is a bug.", so I think I don't need to install JRuby. Google also do not tell me how to fix this bug.

How do I solve this?

===============================

setup.bat
same error:

D:\logstash\bin>setup.bat
Unable to find JRuby.
If you are a user, this is a bug.
If you are a developer, please run 'rake bootstrap'. Running 'rake' requires the 'ruby' program be available.


update:

After I associate
.rb
with
ruby.exe
error change to :

D:\logstash\bin>logstash
Unable to find JRuby.
If you are a user, this is a bug.
If you are a developer, please run 'rake bootstrap'. Running 'rake' requires the 'ruby' program be available.
C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file --
bundler (LoadError)
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from D:/logstash/lib/bootstrap/bundler.rb:44:in `setup!'
from D:/logstash/lib/bootstrap/environment.rb:47:in `<main>'

Answer

I found the sulotion. I cloned the repo in github and try to use it directly , which resulted in this error.

If you cloned the repo you need to first bootstrap your system, by using rake boostrap, but this is usually for developers.
For users is better to grab a packages as the ones provided at https://www.elastic.co/downloads/logstash