Mithril
Mithril

Reputation: 13718

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>'

Upvotes: 5

Views: 11599

Answers (5)

Aishvarya Suryawanshi
Aishvarya Suryawanshi

Reputation: 75

Start logstash with Windows powershell. Worked for me

.\logstash-7.9.0\bin\logstash -f .\simpleconf.conf 

Upvotes: 0

Abhinav Keshri
Abhinav Keshri

Reputation: 625

First time - I unzipped the "kibana" and "logstash" zipped files with "Extract All" option. I got the above mentioned error.

But when I unzipped those zipped files with "7zip", first, it took less time and second, it worked as expected.

Try Unzipping it with "7zip".

Upvotes: 2

Moch Yusup
Moch Yusup

Reputation: 1346

I've tried solution like download and extract the zip file instead of .tar.gz one but it did not seem to be working. In my case there is a space within my filepath, yes a SPACE.

In my case I put the logstash in "D:\Program Files\ElasticSearch\logstash". Notice that the "Program Files" folder contain SPACE. I copied the logstash to new folder "ProgramFiles" (without space), so the path is now "D:\ProgramFiles\ElasticSearch\logstash" and start the setup.bat or logstash.bat. And it works.

Short Answer: Make sure that the file path of your log stash does not contain any spaces.

Upvotes: 1

Brian Rice
Brian Rice

Reputation: 3257

This still persists in 2.3.4!

This is an issue with the .zip download but not with the tar.gz. The vendor/jruby directory is missing in the former. Grab it from tar.gz download.

Upvotes: 3

Mithril
Mithril

Reputation: 13718

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

Upvotes: 1

Related Questions