Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto setting RBENV_VERSION #99

Closed
take opened this issue Feb 22, 2013 · 10 comments
Closed

auto setting RBENV_VERSION #99

take opened this issue Feb 22, 2013 · 10 comments

Comments

@take
Copy link

take commented Feb 22, 2013

Seems like tmuxinator is auto setting RBENV_VERSION.

Which leads to a problem that .ruby-version doesn't affect the ruby version since RBENV_VERSION is favored over .ruby-version :(

Of course when I use normal tmux, this doesn't happen.

I'm using tmux 1.7 and tmuxinator 0.5.0

@take
Copy link
Author

take commented Feb 27, 2013

looks like the problem is occured by rbenv, not tmuxinator. so i'll be closing this.

temporary solution is to add the belows option to .tmux.conf

set-environment -gu RBENV_VERSION

ref http://stackoverflow.com/a/15021934/1446551

@take take closed this as completed Feb 27, 2013
@stuarts
Copy link

stuarts commented Apr 3, 2013

No, I'm now running into this issue as well. When tmux is started normally it does not set $RBENV_VERSION. It only happens when you start up the tmux server with a tmuxinator session.

@stuarts
Copy link

stuarts commented Apr 4, 2013

OK, the problem is that rbenv is setting these environment variables in the ruby shell and tmuxinator isn't clearing those variables before it starts the tmux process.

@take
Copy link
Author

take commented Apr 4, 2013

i c, but normall tmux clears them?

@stuarts
Copy link

stuarts commented Apr 4, 2013

They aren't set when you directly run tmux. They are only ever set because
tmuxinator is a ruby program and it spawns tmux as a child process.

On Wed, Apr 3, 2013 at 7:16 PM, Takehiro Adachi notifications@github.comwrote:

i c, but normall tmux clears them?


Reply to this email directly or view it on GitHubhttps://github.com//issues/99#issuecomment-15876561
.

@take
Copy link
Author

take commented Apr 5, 2013

@stuarts

oooo yea i c. how did u solve the problem ? :O

btw im still using the temporary solution written above

@stuarts
Copy link

stuarts commented Apr 5, 2013

I just placed this in my tmuxinator config for the project.

pre:
  - export RBENV_DIR=
  - export RBENV_VERSION=

On Fri, Apr 5, 2013 at 7:12 AM, Takehiro Adachi notifications@github.comwrote:

@stuarts https://github.com/stuarts

oooo yea i c. how did u solve the problem ? :O


Reply to this email directly or view it on GitHubhttps://github.com//issues/99#issuecomment-15957835
.

@take
Copy link
Author

take commented Apr 6, 2013

ooo i c, thx! 👍

@phantomwhale
Copy link

Same issue - same solution - thanks 👍

@fffx
Copy link

fffx commented Oct 15, 2017

For rvm , faced similar problem, I use this

pre_window: if [[ -f ".ruby-version" ]] &&  [[ -f ".ruby-gemset" ]]; then rvm use $(cat .ruby-version)@$(cat .ruby-gemset); fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants