[Ruby] Bundler problem with JBundler

Here’s the relevant section of my circle.yml:

dependencies:
  # For some unknown reason the default bundle install command _seemed_ to be
  # successfully installing everything, including jbundler, but then
  # `jbundle install` would fail because `jbundle` couldn’t be found. ¯\_(ツ)_/¯
  #
  # It seems like maybe this simple invocation of `bundle install` doesn’t
  # utilize CircleCI’s caching facilities, which slows down the builds.
  # So TODO: either remove this override and fix the problem with jbundler, or
  # modify the `bundle install` command to utilize the cache.
  override:
    - bundle install

  post:
    - jbundle install

As described in the comment, even though my Gemfile includes jbundler and the output of the inferred bundle install step shows that it installed JBundler, my custom command jbundle install fails because jbundle can’t be found.

This works just fine on my Mac and on a few of my Ubuntu servers.

Anyone have any idea what’s going on here?

Thanks!

After some trial and error I found I was able to resolve this by removing the override and changing the post command to bundle exec jbundle install.

I guess this is related to some nuance of rvm/gemsets/gems/bundler/etc that I don’t understand.