This makes it possible to run my Jekyll site with the latest 2.2.3 Ruby runtime and build the plugin with JRuby on my machine. It not only manages ruby itself, but also all associated executables ( gem, irb, rake, etc.) by isolating every runtime. While Homebrew makes the jruby package available, it seems there’s only one single gem repository per system - and it reacts very poorly to being managed by different runtimes.Īfter some more browsing, I found the solution: rbenv. The second realization is that while it’s easy to install multiple Ruby runtimes on a machine, it’s impossible to have them run at the same time. Simple Ruby is not enough for Logstash plugin development: it requires a dedicated runtime that runs on the JVM, aka JRuby. The first realization - and it took a lot of time (browsing and reading), is that there are different flavors of Ruby runtimes. No implicit conversion of nil into String Trying to install the gem yields the following: gem install bundlerĮRROR: While executing gem. To install dependencies, the bundler gem first needs to be installed. This is a feature of the Bundler utility gem. Not only dependencies, but also metadata are declared in the associated gemspec file. However, in this case, the gemspec directive adds one additional indirection level. The generation yields the following structure: This is explained in the online procedure. Though new Logstash plugins can be started from scratch, the documentation advises you to start from a template. This post is a sum-up of the steps I went through, in the hopes that it might benefit others who find themselves in the same situation. Given that I don’t have months, and that whatever I learned is good enough, I opted for the second option. Or learn on the spot by diving right into development.Read documentation and tutorials about Ruby, Gems, Bundler, the whole nine yards, and come back in a few months (or more).Long talk short, I start from scratch in Ruby.Īt this stage, there are two possible approaches: I’ve been developing in Java a lot, I’ve dabbled somewhat in Scala, I’m quite interested in Kotlin - in the end, I’m just a JMV developer (plus some JavaScript here and there). Expectedly, the site assumes the reader is familiar with both. Such an endeavor requires Ruby skills - not only the language syntax but also the ecosystem. The Elasticsearch site offers quite an exhaustive documentation to create one’s own Logstash plugin. I chose to pull data from Reddit because a) I use it often and b) there’s no existing plugin that offers that. I recently became interested in Logstash, and after playing with it for a while, I decided to create my own custom plugin for learning purpose.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |