Closed efigarolam closed 4 years ago
That's pretty strange since Overmind doesn't do any fancy stuff with launching the processes. Let's do some debugging. Add the following process to your Procfile and give me the result please:
debug: echo "SHELL=$SHELL" && which ruby && ruby -v && which rbenv && rbenv versions && sleep 9999
I suspect that the problem is that fish doesn't set as your login shell which is used by Overmind to launch processes.
Hello @DarthSim thanks for taking a look on this, here is the output for the debug
process
debug | SHELL=/usr/local/bin/fish
debug | /usr/bin/ruby
debug | ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
debug | /usr/local/bin/rbenv
debug | system
debug | 2.5.0
debug | Exited
Let me know if I need to help you with anything else.
Well, it looks weird because everything is ok except of ruby version. Could you also show me rbenv versions
output outside of Overmind?
This is what I see when I run rbenv versions
within my project dir, I see the same within and out of tmux
system
2.5.0
* 2.5.1 (set by /Users/efigarola/workspace/project/.ruby-version)
2.6.2
2.6.4
2.6.5
Ok, that's interesting. So, rbenv doesn't see the whole list of installed Rubies inside Overmind. Could you add rbenv root
to the debug
process right before sleep
and show me the output? Also, run it outside of Overmind and show me the output.
Cool, here is the result of rbenv root
outside overmind:
/Users/efigarola/.rbenv
Here is the debug process of overmind:
webpack | Started with pid 77401...
debug | Started with pid 77399...
web | Started with pid 77400...
debug | SHELL=/usr/local/bin/fish
debug | /usr/bin/ruby
debug | ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
debug | /usr/local/bin/rbenv
debug | system
debug | 2.5.0
debug | * 2.5.1 (set by /Users/efigarola/workspace/project/.ruby-version)
debug | 2.6.2
debug | 2.6.4
debug | 2.6.5
debug | /Users/efigarola/.rbenv
webpack | Your Ruby version is 2.6.3, but your Gemfile specified 2.5.1
webpack | Exited
web | Your Ruby version is 2.6.3, but your Gemfile specified 2.5.1
debug | Interrupting...
web | Exited
debug | Exited
Wait a sec, so rbenv sees all the Rubis inside Overmind, and it successfully detects the currectly selected version. This means that the problem is $PATH
. Could you show me your $PATH
inside and outside of Overmind?
I noticed that, but it behaves randomly, sometimes it shows them, sometimes it don't, I think it depends in how quickly the other processes fails.
Here is the output of $PATH within overmind:
debug | PATH=/Users/efigarola/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Apple/bin:/Users/efigarola/.rbenv/shims
Here is the output outside overmind:
echo "PATH=$PATH"
PATH=/Users/efigarola/.rbenv/shims:/Users/efigarola/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Apple/bin:/Users/efigarola/.rbenv/shims
Looks like the difference is at the beginning /Users/efigarola/.rbenv/shims
...
I think it depends in how quickly the other processes fails
Yeah, it makes sense.
It's left to determine how you add /Users/efigarola/.rbenv/shims
to your PATH and how you initialize rbenv.
I personally use oh-my-fish with rbenv plugin, and I have no problems like this.
@DarthSim ok, I just installed rbenv plugin with oh-my-fish, and now it works. I'm sorry if this should have been obvious, I'm new to fish, I was not aware of the existence of that rbenv plugin
Thanks for your support on this, do you want me to write a note on the README or any other place about this?
Was glad to help! 👍
I'll add the known issues section to README.
Great, thank you again, I will close this!
Hi! I'd like to report an issue that I'm having and it stops me from using overmind. I have used foreman for years and I heard of overmind a couple of months ago.
I use tmux and fish shell. Here is the output I'm seeing when attempting to run
overmind start
Here are some details of my machine:
Procfile:
Gem ENV outside tmux:
Gem env inside tmux:
I noticed in the error shown by overmind that it attempts to use ruby 2.3 which is not the version I'm using in my project, I use
rbenv
for managing my ruby environment and both the local and global version of ruby are2.5.1
Any ideas on what I'm missing? foreman works and running
tmux new bin/rails s
also works. I have really liked what overmind has to offer and that's why I decided to migrate from foreman