schasse / tmux-jump

Vimium/Easymotion like navigation for tmux.
GNU General Public License v3.0
362 stars 16 forks source link

Error 127 after using key binding #23

Closed SMMousaviSP closed 4 years ago

SMMousaviSP commented 4 years ago

This is the output when I use tmux-prefix + j:

'/home/mohammad/.tmux/plugins/tmux-jump/scripts/tmux-jump.sh' returned 127

I can run tmux-jump.sh directly without problem but not with the key binding.

OS: Ubuntu 20.4 tmux version: 3.0a Ruby version: 2.7.1p83

schasse commented 4 years ago

Hi,

thanks for reporting this.

Exit code 127 indicates command not found. And probably it's ruby. How did you install ruby? Is it available just in your current shell or is it globally available? What does which ruby return? And what does echo $PATH return?

SMMousaviSP commented 4 years ago

Hi,

I've installed latest stable version of ruby with rbenv.

This is the output of which ruby:

/home/mohammad/.rbenv/shims/ruby

And /home/mohammad/.rbenv/shims is in my path. echo $PATH output:

/home/mohammad/.rbenv/shims:/home/mohammad/.rbenv/bin:/home/mohammad/.pyenv/plugins/pyenv-virtualenv/shims:/home/mohammad/.pyenv/shims:/home/mohammad/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
schasse commented 4 years ago

Okay. When tmux starts a shell, the setup of the environment is probably different and it doesn‘t setup the path.

There are different options to solve this:

I‘d recommend installing ruby globally. I‘m don‘t know, though, how that‘s done easily with mac. This allows you to update tmux-jump in the future without having to resolve conflicts.

SMMousaviSP commented 4 years ago

Problem solved by installing ruby from ubuntu repository:

sudo apt install ruby

Thank you