pitluga / subcontractor

rvm aware process launcher for foreman
84 stars 24 forks source link

rbenv with bundler #22

Closed agoodno closed 7 years ago

agoodno commented 9 years ago

I'm getting an error when launching 2 rails instances in different directories using rbenv and bundler. I've looked at the other outstanding issue with rbenv and the suggestion to add the path to the Gemfile but that didn't work for me. This exact setup works with rvm using --rvm. I'm trying to switch my projects to rbenv. Both rails project run fine individually too using 'bundle exec rails server'.

Error is:

23:01:04 customerservice.1 | started with pid 28887
23:01:04 onevueapi.1       | started with pid 28888
23:01:05 onevueapi.1       | rbenv: no local version configured for this directory
23:01:05 onevueapi.1       | /home/andrew/.rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'bundler' (>= 0) among 8 total gem(s) (Gem::LoadError)
23:01:05 onevueapi.1       |    from /home/andrew/.rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/dependency.rb:309:in `to_spec'
23:01:05 onevueapi.1       |    from /home/andrew/.rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in `gem'
23:01:05 onevueapi.1       |    from /home/andrew/.rbenv/versions/2.1.1/gemsets/onevueapi-gemset/bin/bundle:22:in `<main>'
23:01:05 onevueapi.1       | exited with code 0
23:01:05 system            | sending SIGTERM to all processes
23:01:05 customerservice.1 | terminated by SIGTERM

My Procfile is:

customerservice:       bundle exec rails s -p 3005
onevueapi:             bundle exec subcontract --rbenv . --chdir ../onevueapi --signal INT -- bundle exec rails s -p 3000

The directory ~/src/onevueapi exists and I'm executing like:

~/src/customerservice> bundle exec foreman start