Closed jared-thoughtbot closed 2 years ago
Having similar issue. Getting error when running overmind start
Your Ruby version is 3.1.2, but your Gemfile specified 2.7.4
while having the current version pointed to 2.7.4
Seems like overmind
use default instead of the current version of ruby.
Changing rvm
default version to the needed version resolves the problem. @jared-thoughtbot, thanks for the suggested workaround.
Sorry, can't reproduce this :( Here's my shell output:
$ rvm list
=> ruby-2.7.6 [ arm64 ]
* ruby-3.1.2 [ arm64 ]
# => - current
# =* - current && default
# * - default
$ ruby -v
ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [arm64-darwin21]
$ which ruby
/Users/darthsim/.rvm/rubies/ruby-2.7.6/bin/ruby
$ ./overmind s -f Procfile.test
system | Tmux socket name: overmind-overmind-bNgYagaY6ln9AuE5FxSDy
system | Tmux session ID: overmind
system | Listening at ./.overmind.sock
ruby-v | Started with pid 49572...
which-ruby | Started with pid 49573...
ruby-v | ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [arm64-darwin21]
which-ruby | /Users/darthsim/.rvm/rubies/ruby-2.7.6/bin/ruby
ruby-v | Exited
which-ruby | Interrupting...
which-ruby | Exited
As you can see, the current Ruby version differs from the default one yet Overmind uses the current version as expected.
On a very basic level, Overmind doesn't do anything fancy but run tmux with commands from the Procfile. You can emulate the same behavior without Overmind involved:
echo -e "#\!/bin/sh\nruby -v\nwhich ruby\nsleep 10" > ruby-test.sh
chmod +x ruby-test.sh
tmux -L rubytest new ./ruby-test.sh
If it shows the wrong version too then Overmind is not a cause and you need to check your RVM installation.
Thanks for taking the time to investigate this!
I can confirm I'm seeing the wrong version when testing using your simplified script.
I am using fish shell so maybe there's something in the rvm config that's not right. I'll close this for now. Cheers!
@jared-thoughtbot I also have this issue on the fish shell. Probably something with fish configs 🤔
Problem
When using rvm and trying to run
overmind start
it fails withCould not find 'bundler' (1.17.3) required by your /home/jaredt/projects/maitre-d/Gemfile.lock. (Gem::GemNotFoundException)
.I seem to have narrowed this down to when using rvm and having the necessary ruby version installed and in use, but it not being the default rvm ruby.
Steps to reproduce
2.6.9
and2.7.5
rvm --default use 2.7.5
2.6.9
)ruby -v
andwhich ruby
rails server
overmind start
What you expected to see
The various services start up
What you saw instead
Notes
rvm list
to confirm the other ruby version is installed and it's the defaultrvm --default use 2.6.9
overmind start