# Cannot get started with development of a Logstash plugin: README incorrect?

**URL:** https://discuss.elastic.co/t/cannot-get-started-with-development-of-a-logstash-plugin-readme-incorrect/365771
**Category:** Logstash
**Created:** [August 29, 2024, 12:49pm UTC](https://discuss.elastic.co/t/cannot-get-started-with-development-of-a-logstash-plugin-readme-incorrect/365771 "2024-08-29T12:49:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![frans-wtax](https://avatars.discourse-cdn.com/v4/letter/f/ce73a5/32.png) [@frans-wtax](https://discuss.elastic.co/u/frans-wtax)
#### Post date: [August 29, 2024, 12:49pm UTC](https://discuss.elastic.co/t/cannot-get-started-with-development-of-a-logstash-plugin-readme-incorrect/365771/1 "2024-08-29T12:49:41Z")

</div>

I'm new to Ruby and Rails, so go easy on me 🙂 Maybe I'm missing something that's completely obvious to an experienced Ruby developer but not to this guy with 20 years on Java 🤷‍♂️

The README information to set up a development environment doesn't work for me. I'm on macOS 14.5 and installed JRuby using Homebrew: `which jruby` returns `/opt/homebrew/opt/jruby/bin/jruby`.

The first step is to run `bundle install` but it gives me an error message:

> Could not find gem 'logstash-devutils' in any of the gem sources listed in your Gemfile.

After some googling it seemed that because logstash-devutils is a Java-based module, I need to run jbundle instead of bundle.

That seems to work better, I get a bunch of "Fetching X", "Using X", "Installing X" messages on the console.

Great, on to the unit tests.

Per the README, I need to run `bundle exec rspec`.

So I do that, but then I get an error message

> Could not find 'bundler' (2.3.26) required by your .../Gemfile.lock  
> To update to the latest version installed on your system, run `bundle update --bundler`.

So I run `bundle update --bundler` but that just tells me

> You must use Bundler 2 or greater with this lockfile.

I give this up and give jbundle a try again: `jbundle exec rspec`

That fails with:

> bundler: command not found: rspec  
> Install missing gem executables with `bundle install`

Which is ironic because I just ran `bundle install` a few seconds back.

What's going on here? Is it my setup? Are the instructions in the README just plain wrong?

Any help would be appreciated.

The particular plugin I'm trying to work on is [GitHub - logstash-plugins/logstash-input-salesforce: Logstash input for pulling objects from salesforce](https://github.com/logstash-plugins/logstash-input-salesforce), but from what I can tell the README is identical to that of other Logstash plugins so it's probably not particular to this plugin.

Thanks for any insights!  
Frans

---

<div class="post-metadata">

### Author: ![jsvd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsvd/32/6203_2.png) [@jsvd](https://discuss.elastic.co/u/jsvd)
#### Post date: [September 9, 2024, 9:07am UTC](https://discuss.elastic.co/t/cannot-get-started-with-development-of-a-logstash-plugin-readme-incorrect/365771/2 "2024-09-09T09:07:13Z")

</div>

Sorry for the delay @frans-wtax, here are the steps:

```auto
/tmp $ mkdir sandbox
/tmp $ cd sandbox
/tmp/sandbox $ git clone git@github.com:logstash-plugins/logstash-input-salesforce.git
/tmp/sandbox $ curl https://artifacts.elastic.co/downloads/logstash/logstash-8.14.3-darwin-aarch64.tar.gz | tar -zxf -
/tmp/sandbox $ cd logstash-input-salesforce
/tmp/sandbox/logstash-input-salesforce $ export LOGSTASH_PATH=/tmp/sandbox/logstash-8.14.3 LOGSTASH_SOURCE=1 
/tmp/sandbox/logstash-input-salesforce $ bundle install --path=vendor/bundle
/tmp/sandbox/logstash-input-salesforce $ bundle exec rspec

```

The output can be seen here: [gist:6b396a329243e8ee337fa2d31011897f · GitHub](https://gist.github.com/jsvd/6b396a329243e8ee337fa2d31011897f)

---

<div class="post-metadata">

### Author: ![frans-wtax](https://avatars.discourse-cdn.com/v4/letter/f/ce73a5/32.png) [@frans-wtax](https://discuss.elastic.co/u/frans-wtax)
#### Post date: [September 9, 2024, 9:33am UTC](https://discuss.elastic.co/t/cannot-get-started-with-development-of-a-logstash-plugin-readme-incorrect/365771/3 "2024-09-09T09:33:51Z")

</div>

Thank you!

When I run bundle install, it tells me

```auto
[!] There was an error while loading `logstash-core-plugin-api.gemspec`: The logstash-core-api need to be build on jruby. Bundler cannot continue.

```

Is your `bundle` somehow (sym)linked to `jbundle`? On my machine:

```auto
$ which bundle
/usr/bin/bundle
$ which jbundle
/opt/homebrew/opt/jruby/bin/jbundle

```

Thanks again,  
Frans

---

<div class="post-metadata">

### Author: ![jsvd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsvd/32/6203_2.png) [@jsvd](https://discuss.elastic.co/u/jsvd)
#### Post date: [September 9, 2024, 10:39am UTC](https://discuss.elastic.co/t/cannot-get-started-with-development-of-a-logstash-plugin-readme-incorrect/365771/4 "2024-09-09T10:39:18Z")

</div>

Looks like you have two rubies, the C based ruby installed by macos and JRuby from homebrew.

The JRuby homebrew seems to install a jbundle to avoid clashing with the C ruby, so you can use `jbundle` where I used `bundle`.

An alternative is to install a ruby version manager like rvm ([https://rvm.io/](https://rvm.io/)) to manage it for you (similar to sdkman or jenv).

---

<div class="post-metadata">

### Author: ![frans-wtax](https://avatars.discourse-cdn.com/v4/letter/f/ce73a5/32.png) [@frans-wtax](https://discuss.elastic.co/u/frans-wtax)
#### Post date: [September 9, 2024, 6:10pm UTC](https://discuss.elastic.co/t/cannot-get-started-with-development-of-a-logstash-plugin-readme-incorrect/365771/5 "2024-09-09T18:10:00Z")

</div>

OK great, I got the rspec tests to run this way! Thanks 🙂
