Jets deploy for mega mode app using rbenv yields can't find gem bundler (>= 0.a) with executable bundle


I am running on a Mac with rbenv to manage ruby versions, and I am using ruby 2.5.3 as I found recommended elsewhere. (Possible source of problem?)

I have created a simple app, and imported the rails app.

jets new mojohowitz
cd ./mojohowitz
jets import:rails
vim .env.development.remote
vim ./config/environments/development.rb
jets deploy

I get the following.

Traceback (most recent call last):
	2: from /Users/matthew/.rbenv/versions/2.5.3/bin/bundle:23:in `<main>'
	1: from /Users/matthew/.rbenv/versions/2.5.3/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/Users/matthew/.rbenv/versions/2.5.3/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
cd /Users/matthew/Documents/dev/jets/mojohowitz && bundle install failed to run.
/Users/matthew/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/jets-2.3.14/lib/jets/builders/code_builder.rb:242:in `block in compile_rails_assets'

Looking at line 242 in code_builder.rb, I see:

238       Bundler.with_clean_env do
239         # Switch gemfile for Afterburner mode
240         gemfile = ENV['BUNDLE_GEMFILE']
241         ENV['BUNDLE_GEMFILE'] = "#{jets_root}/rack/Gemfile"
242         sh "cd #{jets_root} && bundle install"

I am guessing the rbenv magic is not happening when that shell is running. Maybe there is a standard way such things are handled elsewhere in jets. Any thoughts on approach to resolution?


Anyone out there using rbenv who has (or has not) had trouble getting jets deploy to work after jets import:rails ...?