-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: Could not find a valid gem 'logstash-devutils' (= 0.0.15) in any repository #68
Comments
Update: I downloaded the gem manually and when I do try to install it manually, i get a dependency errors Unable to resolve dependencies: logstash-devutils requires logstash-core-plugin-api (<= 2.99, >= 2.0) |
This is failing to install because the ruby you are using is not JRuby. I have a broader question, though, what makes you try to install logstash-devutils manually? Our intention is that this library provides support for logstash tests and logstash plugin tests. You generally do not need to install it manually. What are you trying to do that makes you want to install logstash-devutils manually? |
Thanks for the feedback, I do have JRuby but the issue seems to be a dependency hell. In regards to your question: I'm trying to find a way to create a logstash configuration (including customized grok patterns) and be able to provide a unit test of the configuration file. This is to ensure quality when providing a custom configuration file. In your case, you have some grok patterns that does not seem to have a test associated to it, so I want to implement a mechanism to provide a test scenario that can be used to find issues on the patterns and so on. To give you a concrete example, please check this out this cool hack https://github.com/gquintana/gquintana.github.io/blob/master/sources/2016-09-07-Testing-Logstash-configuration/spec/02_logstash_nginx_filter_spec.rb#L2 As you can see on line number 2, the guy is using require "logstash/devutils/rspec/spec_helper" Any ideas how to address that issue? |
I don't know what you mean by dependency hell.
This error message is an indication that you are running In general, you do not need to install
(Pardon the detailed explanation below if you already know these things, I'm trying to get you a good answer) In ruby, I looked at what your link, and I think I understand a little bit more now. What you linked has a
I do not believe there are shortcuts to this. If you want a shortcut, can you help me understand what you want to avoid? |
Hi @jordansissel , thanks for the further explanation, it is very useful specially since I'm a newcomer to ruby itself. What I meant by dependency hell, is if you look at the gem published here https://rubygems.org/gems/logstash-devutils/versions/1.3.1-java, it says it has many dependencies and even when I tried to install the gem including all the dependencies (gem install --include-dependencies) I got some warnings that dependencies were not found. Anyway I'm pretty sure I was doing something wrong when installing the gem and need to understand better the switch from ruby to jruby. I was expecting to run the unit testing isolated without needing logstash repo, that is for convenience. Basically the use case is that we can write logstash configurations for several purposes and for parsing log files but provide also a unit test with a sample log, something similar to what you saw in the example. Since the gem was published, I was expecting that you could use it in your project without relying totally on the logstash project. I certainly can test just the grok pattern, but I'm more concern on testing the output of the logstash file after doing several mutations and applying filters. As you can see basically the use case is to provide a Logstash configuration file for any specific purpose but also provide a unit test with a sample log that can be used for troubleshooting purposes as versions of the log file can be different. So in order to answer your question, I'm looking for a way to distribute our configurations and unit testing without needing logstash code although it might not be possible as I can see. I will follow your recommendations about cloning the Logstash repo and building it in the way you have explained. Thanks for all your help. |
@michaelhidalgo Did you fix the issue? I'm trying to follow the basic tutorial to write a logstash filter plugin but I am not able to install my example:
Thank you. |
Hi anyone found a solution for this problem? I'm using JRuby and even after I install manualy the 'logstash-devutils' I can't run the bundle install:
|
I'm having trouble replicating this, what jruby are you using? can you post |
|
can you do |
I'm running it like |
is bundle installed locally in that jruby installation? I'm having trouble finding any other reason other than jruby/bundler/gem weirdness since I'm able to run that command locally and it's a normal gem installation like any other |
So I uninstall every ruby version of my machine, reinstall only JRuby and I'm using only bundle install and kept bump into the same error, here is my gem env: `RubyGems Environment:
|
I switch to an Ubuntu machine and install JRuby with RVM, when I run:
I get:
When I try to run
My Gem ENV: `RubyGems Environment:
Any lights about this? |
Solved it adding to my gemspecs the follow:
|
"jruby -S bundle install" will solve this problem |
I am still getting this error, wanted to run tests for a PR.
|
Hi folks, I'm sorry for not being a good citizen here, I was working on a company that closed their operations so I could not continue researching this, that's mainly why I have not helped out with more feedback. I will keep this ticket open so maybe someone can help. |
I managed to solve this by using the jruby instance bundled with logstash instead. In my case, the following worked: $ /usr/share/logstash/bin/ruby -S bundle install (substitute for other commands in the README as appropriate) |
Not yet, same issue. Moved on to something else
From: Thijs Molendijk <[email protected]>
Reply-To: elastic/logstash-devutils <[email protected]>
Date: Monday, May 18, 2020 at 5:45 PM
To: elastic/logstash-devutils <[email protected]>
Cc: Vinayak <[email protected]>, Comment <[email protected]>
Subject: Re: [elastic/logstash-devutils] ERROR: Could not find a valid gem 'logstash-devutils' (= 0.0.15) in any repository (#68)
@michaelhidalgo<https://github.com/michaelhidalgo> Did you fix the issue? I'm trying to follow the basic tutorial to write a logstash filter plugin but I am not able to install my example:
$ bundler install
Fetching gem metadata from https://rubygems.org/.........
Could not find gem 'logstash-devutils' in any of the gem sources listed in your Gemfile.
Thank you.
I managed to solve this by using the jruby instance bundled with logstash instead. In my case, the following worked:
$ /usr/share/logstash/bin/ruby -S bundle install
(substitute for other commands in the README as appropriate)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#68 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAM7KVHZUJ5ZEJFARFGFVKDRSERF5ANCNFSM4DKWYCOQ>.
|
I also faced the same issue. For me installing using jruby did the trick as logstash is using jruby. You can read more here https://gist.github.com/jordansissel/978956 |
The problem appears due to a PATH ordering issue. I'm not sure what the issue is (and the plugin development documentation is not clear about this). I'm setting up a Docker image that I shall use for logstash plugin development, and using a clone of the logstash-filter-example, I can observe the following with regard to the ordering of PATH jruby/bin BEFORE logstash/bin --> SUCCESS using 'bundle install' EDIT: Actually, in retrospect, jruby should be before logstash. There is a notion within logstash of an 'outer/infra' version of JRuby (which is the version you get asked to provide) and the 'runtime' version of JRuby which logstash vendors..... this makes for a very confusing experience. In then interests of making something reproducible, I've build a Docker image for plugin development: https://github.com/cameronkerrnz/logstash-plugin-dev |
Useful thread, but I too got stuck in jRuby/dependency hell. Luckily for me I needed a Docker container as the endpoint, so I just did a multistage build. With the Docker container obviously you've got full control of the environment, and the jRuby:9.2 base image seems to build nicely for my simple filter plugin. Thought I'd mention it as a possibility for some out there. |
logstash-devutils 需要依托于jruby 而不是ruby 这个需要特别注意。 |
I don't know if it's related to how I installed jruby (using Homebrew), but I don't have a |
Hi guys, I'm newbie to ruby as you will noticed but I wanted to install the logstash-devutils gem (https://rubygems.org/gems/logstash-devutils/versions/0.0.15-java) on the Mac following this command :
gem install --local logstash-devutils -v 0.0.15
And i get below error message:
:
ERROR: Could not find a valid gem 'logstash-devutils' (= 0.0.15) in any repository
Any thoughts?
I also tried latest version of the gem
gem install logstash-devutils
ERROR: Could not find a valid gem 'logstash-devutils' (>= 0), here is why:
Found logstash-devutils (1.3.1), but was for platform java
The text was updated successfully, but these errors were encountered: