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

/bin/bash: shell_session_update: command not found #210

Open
GertThiel opened this Issue Mar 30, 2016 · 27 comments

Comments

Projects
None yet
@GertThiel

GertThiel commented Mar 30, 2016

Since today direnv is broken:

direnv: loading .envrc                                                                                                                                          
/bin/bash: shell_session_update: command not found
direnv: error exit status 127

I'm using ZSH on Mac OS X 10.11.4.

@GertThiel

This comment has been minimized.

Show comment
Hide comment
@GertThiel

GertThiel Mar 30, 2016

Googling /bin/bash: shell_session_update: command not found only yields one remotely relevant result which does not help me.

GertThiel commented Mar 30, 2016

Googling /bin/bash: shell_session_update: command not found only yields one remotely relevant result which does not help me.

@zimbatm

This comment has been minimized.

Show comment
Hide comment
@zimbatm

zimbatm Mar 30, 2016

Member

Hi, I need a bit more info so I can debug.

Can you tell me what version of direnv you are using and paste the content of the .envrc if possible ?

Member

zimbatm commented Mar 30, 2016

Hi, I need a bit more info so I can debug.

Can you tell me what version of direnv you are using and paste the content of the .envrc if possible ?

@zimbatm

This comment has been minimized.

Show comment
Hide comment
@zimbatm

zimbatm Mar 30, 2016

Member

Also what terminal app are you using. The default Terminal.app ?

Member

zimbatm commented Mar 30, 2016

Also what terminal app are you using. The default Terminal.app ?

@zimbatm

This comment has been minimized.

Show comment
Hide comment
@zimbatm

zimbatm Mar 30, 2016

Member

Can you also paste the content of /etc/bashrc_Apple_Terminal ? I don't have access to a Mac right now.

Member

zimbatm commented Mar 30, 2016

Can you also paste the content of /etc/bashrc_Apple_Terminal ? I don't have access to a Mac right now.

@GertThiel

This comment has been minimized.

Show comment
Hide comment
@GertThiel

GertThiel Mar 30, 2016

direnv 2.7.0 installed using Homebrew

The .envrc reads

#!/bin/bash

rvm use `cat .ruby-version`@`cat .ruby-gemset` --create

#
#  Try `bin/rake torquebox:check` to check whether the application server
#  is installed correctly.
#  The `torquecheck` gem helps with detailed information when something goes
#  awfully wrong.
#
#  Torquebox:                 http://torquebox.org/
#  torquebox-console:         https://github.com/torquebox/torquebox-console
#  torquecheck:               https://github.com/lance/torquecheck
#

export TORQUEBOX_HOME="/Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2"
export     JBOSS_HOME="$TORQUEBOX_HOME/jboss"
export     JRUBY_HOME="$(rvm info homes | grep "ruby:" | cut -d'"' -f2)"
export      JAVA_OPTS="  -Xmn1024m   -Xms4096m   -Xmx4096m"
export     JRUBY_OPTS="-J-Xmn1024m -J-Xms4096m -J-Xmx4096m"
#xport           PATH="$JRUBY_HOME/bin:$PATH"

echo "TORQUEBOX_HOME = $TORQUEBOX_HOME"
echo "    JBOSS_HOME = $JBOSS_HOME"
echo "    JRUBY_HOME = $JRUBY_HOME"
echo "     JAVA_OPTS = $JAVA_OPTS"
echo "    JRUBY_OPTS = $JRUBY_OPTS"
#cho "          PATH = $PATH"


#
#  Vagrant shall use VMware Fusion instead of VirtualBox
#

export VAGRANT_DEFAULT_PROVIDER="vmware_fusion"

The complete terminal output is

direnv: loading .envrc                                                                                                                                          
Using /Users/gertthiel/.rvm/gems/jruby-1.7.19 with gemset Stanza2
TORQUEBOX_HOME = /Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2
    JBOSS_HOME = /Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2/jboss
    JRUBY_HOME = /Users/gertthiel/.rvm/rubies/jruby-1.7.19
     JAVA_OPTS =   -Xmn1024m   -Xms4096m   -Xmx4096m
    JRUBY_OPTS = -J-Xmn1024m -J-Xms4096m -J-Xmx4096m
/bin/bash: shell_session_update: command not found
direnv: error exit status 127

I'm using Terminal.app.

This is /etc/bashrc_Apple_Terminal, zipped for Github's sake:

bashrc_Apple_Terminal.zip

GertThiel commented Mar 30, 2016

direnv 2.7.0 installed using Homebrew

The .envrc reads

#!/bin/bash

rvm use `cat .ruby-version`@`cat .ruby-gemset` --create

#
#  Try `bin/rake torquebox:check` to check whether the application server
#  is installed correctly.
#  The `torquecheck` gem helps with detailed information when something goes
#  awfully wrong.
#
#  Torquebox:                 http://torquebox.org/
#  torquebox-console:         https://github.com/torquebox/torquebox-console
#  torquecheck:               https://github.com/lance/torquecheck
#

export TORQUEBOX_HOME="/Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2"
export     JBOSS_HOME="$TORQUEBOX_HOME/jboss"
export     JRUBY_HOME="$(rvm info homes | grep "ruby:" | cut -d'"' -f2)"
export      JAVA_OPTS="  -Xmn1024m   -Xms4096m   -Xmx4096m"
export     JRUBY_OPTS="-J-Xmn1024m -J-Xms4096m -J-Xmx4096m"
#xport           PATH="$JRUBY_HOME/bin:$PATH"

echo "TORQUEBOX_HOME = $TORQUEBOX_HOME"
echo "    JBOSS_HOME = $JBOSS_HOME"
echo "    JRUBY_HOME = $JRUBY_HOME"
echo "     JAVA_OPTS = $JAVA_OPTS"
echo "    JRUBY_OPTS = $JRUBY_OPTS"
#cho "          PATH = $PATH"


#
#  Vagrant shall use VMware Fusion instead of VirtualBox
#

export VAGRANT_DEFAULT_PROVIDER="vmware_fusion"

The complete terminal output is

direnv: loading .envrc                                                                                                                                          
Using /Users/gertthiel/.rvm/gems/jruby-1.7.19 with gemset Stanza2
TORQUEBOX_HOME = /Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2
    JBOSS_HOME = /Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2/jboss
    JRUBY_HOME = /Users/gertthiel/.rvm/rubies/jruby-1.7.19
     JAVA_OPTS =   -Xmn1024m   -Xms4096m   -Xmx4096m
    JRUBY_OPTS = -J-Xmn1024m -J-Xms4096m -J-Xmx4096m
/bin/bash: shell_session_update: command not found
direnv: error exit status 127

I'm using Terminal.app.

This is /etc/bashrc_Apple_Terminal, zipped for Github's sake:

bashrc_Apple_Terminal.zip

@GertThiel

This comment has been minimized.

Show comment
Hide comment
@GertThiel

GertThiel Mar 30, 2016

I should clarify that none of the env vars is set after loading .envrc:

➜  master git:(master) ✗ direnv reload
direnv: loading .envrc                                                                                                                                          
Using /Users/gertthiel/.rvm/gems/jruby-1.7.19 with gemset Stanza2
TORQUEBOX_HOME = /Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2
    JBOSS_HOME = /Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2/jboss
    JRUBY_HOME = /Users/gertthiel/.rvm/rubies/jruby-1.7.19
     JAVA_OPTS =   -Xmn1024m   -Xms4096m   -Xmx4096m
    JRUBY_OPTS = -J-Xmn1024m -J-Xms4096m -J-Xmx4096m
/bin/bash: shell_session_update: command not found
direnv: error exit status 127
➜  master git:(master) ✗ echo $TORQUEBOX_HOME

➜  master git:(master) ✗ 

GertThiel commented Mar 30, 2016

I should clarify that none of the env vars is set after loading .envrc:

➜  master git:(master) ✗ direnv reload
direnv: loading .envrc                                                                                                                                          
Using /Users/gertthiel/.rvm/gems/jruby-1.7.19 with gemset Stanza2
TORQUEBOX_HOME = /Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2
    JBOSS_HOME = /Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2/jboss
    JRUBY_HOME = /Users/gertthiel/.rvm/rubies/jruby-1.7.19
     JAVA_OPTS =   -Xmn1024m   -Xms4096m   -Xmx4096m
    JRUBY_OPTS = -J-Xmn1024m -J-Xms4096m -J-Xmx4096m
/bin/bash: shell_session_update: command not found
direnv: error exit status 127
➜  master git:(master) ✗ echo $TORQUEBOX_HOME

➜  master git:(master) ✗ 
@GertThiel

This comment has been minimized.

Show comment
Hide comment
@GertThiel

GertThiel Mar 30, 2016

I can circumvent the bug by sourcing .envrc:

➜  master git:(master) ✗ source .envrc
Using /Users/gertthiel/.rvm/gems/jruby-1.7.19 with gemset Stanza2
TORQUEBOX_HOME = /Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2
    JBOSS_HOME = /Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2/jboss
    JRUBY_HOME = /Users/gertthiel/.rvm/rubies/jruby-1.7.19
     JAVA_OPTS =   -Xmn1024m   -Xms4096m   -Xmx4096m
    JRUBY_OPTS = -J-Xmn1024m -J-Xms4096m -J-Xmx4096m
➜  master git:(master) ✗ echo $TORQUEBOX_HOME
/Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2
➜  master git:(master) ✗ 

GertThiel commented Mar 30, 2016

I can circumvent the bug by sourcing .envrc:

➜  master git:(master) ✗ source .envrc
Using /Users/gertthiel/.rvm/gems/jruby-1.7.19 with gemset Stanza2
TORQUEBOX_HOME = /Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2
    JBOSS_HOME = /Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2/jboss
    JRUBY_HOME = /Users/gertthiel/.rvm/rubies/jruby-1.7.19
     JAVA_OPTS =   -Xmn1024m   -Xms4096m   -Xmx4096m
    JRUBY_OPTS = -J-Xmn1024m -J-Xms4096m -J-Xmx4096m
➜  master git:(master) ✗ echo $TORQUEBOX_HOME
/Users/gertthiel/Documents/Projekte/Stanza/torquebox-3.1.2
➜  master git:(master) ✗ 
@zimbatm

This comment has been minimized.

Show comment
Hide comment
@zimbatm

zimbatm Mar 30, 2016

Member

Did you upgrade rvm by any chance ? I suspect it's trying to be "helpful" and introduced that issue.

Can you try adding shell_session_update() { :; } to the top of the .envrc and see if it fixes it ?

Member

zimbatm commented Mar 30, 2016

Did you upgrade rvm by any chance ? I suspect it's trying to be "helpful" and introduced that issue.

Can you try adding shell_session_update() { :; } to the top of the .envrc and see if it fixes it ?

@GertThiel

This comment has been minimized.

Show comment
Hide comment
@GertThiel

GertThiel Mar 30, 2016

I'm not sure, but I upgrade RVM regularly using rvm get stable including this morning.

Adding shell_session_update() { :; } helps.

GertThiel commented Mar 30, 2016

I'm not sure, but I upgrade RVM regularly using rvm get stable including this morning.

Adding shell_session_update() { :; } helps.

@zimbatm

This comment has been minimized.

Show comment
Hide comment
@zimbatm

zimbatm Mar 30, 2016

Member

Yeah that must be it then. I don't know if I want to invest much time into fixing the rvm integration.
To make the fix permanent for your computer you can add that line to your ~/.direnvrc file (create if needed) and it will be loaded for all your projects.

Member

zimbatm commented Mar 30, 2016

Yeah that must be it then. I don't know if I want to invest much time into fixing the rvm integration.
To make the fix permanent for your computer you can add that line to your ~/.direnvrc file (create if needed) and it will be loaded for all your projects.

@GertThiel

This comment has been minimized.

Show comment
Hide comment
@GertThiel

GertThiel Mar 30, 2016

I created a ~/.direnvrc like so:

# Circumvent https://github.com/direnv/direnv/issues/210
#
shell_session_update() { :; }

and that works (good enough).

GertThiel commented Mar 30, 2016

I created a ~/.direnvrc like so:

# Circumvent https://github.com/direnv/direnv/issues/210
#
shell_session_update() { :; }

and that works (good enough).

@GertThiel

This comment has been minimized.

Show comment
Hide comment
@GertThiel

GertThiel Mar 30, 2016

Maybe you want to let the RVM guys know that they might have caused some hiccup?

GertThiel commented Mar 30, 2016

Maybe you want to let the RVM guys know that they might have caused some hiccup?

@GertThiel

This comment has been minimized.

Show comment
Hide comment
@GertThiel

GertThiel Mar 30, 2016

THANK YOU for your prompt response. You saved my day.

GertThiel commented Mar 30, 2016

THANK YOU for your prompt response. You saved my day.

@zimbatm

This comment has been minimized.

Show comment
Hide comment
@zimbatm

zimbatm Mar 30, 2016

Member

Awesome, glad I could help you out. Yes someone should contact the RVM guys and let them know.

To any visitor having the same issue, please +1 this issue so I know if it's worth the effort.

Member

zimbatm commented Mar 30, 2016

Awesome, glad I could help you out. Yes someone should contact the RVM guys and let them know.

To any visitor having the same issue, please +1 this issue so I know if it's worth the effort.

@miketheman

This comment has been minimized.

Show comment
Hide comment
@miketheman

miketheman Jun 14, 2016

Contributor

Hit this today. The workaround didn't work for me - since it appeared also when not in a direnv-enabled directory.

It appears the RVM devs have merged a patch to HEAD that appears to solve this for me.
I ran rvm get head and this problem goes away.

Contributor

miketheman commented Jun 14, 2016

Hit this today. The workaround didn't work for me - since it appeared also when not in a direnv-enabled directory.

It appears the RVM devs have merged a patch to HEAD that appears to solve this for me.
I ran rvm get head and this problem goes away.

@cyaneous

This comment has been minimized.

Show comment
Hide comment
@cyaneous

cyaneous Jul 18, 2016

Having this issue on OS X El Capitan as well. Latest stable.

rvm 1.26.11 (latest) by Wayne E. Seguin wayneeseguin@gmail.com, Michal Papis mpapis@gmail.com [https://rvm.io/]

cyaneous commented Jul 18, 2016

Having this issue on OS X El Capitan as well. Latest stable.

rvm 1.26.11 (latest) by Wayne E. Seguin wayneeseguin@gmail.com, Michal Papis mpapis@gmail.com [https://rvm.io/]

@zimbatm

This comment has been minimized.

Show comment
Hide comment
@zimbatm

zimbatm Jul 19, 2016

Member

did you try to run rvm get head? I don't have access to a mac right now, if anybody has an idea on how to fix this issue let me know!

Member

zimbatm commented Jul 19, 2016

did you try to run rvm get head? I don't have access to a mac right now, if anybody has an idea on how to fix this issue let me know!

@zimbatm

This comment has been minimized.

Show comment
Hide comment
@zimbatm

zimbatm Jul 19, 2016

Member

Can you try adding trap - EXIT after the rvm invocation in the .envrc?

Member

zimbatm commented Jul 19, 2016

Can you try adding trap - EXIT after the rvm invocation in the .envrc?

@domi91c

This comment has been minimized.

Show comment
Hide comment
@domi91c

domi91c Jul 28, 2016

I was having this issue and rvm get head fixed it. Thanks!

domi91c commented Jul 28, 2016

I was having this issue and rvm get head fixed it. Thanks!

@diclophis

This comment has been minimized.

Show comment
Hide comment
@diclophis

diclophis Sep 26, 2016

Is there any schedule when this patch will be merged into stable ?

diclophis commented Sep 26, 2016

Is there any schedule when this patch will be merged into stable ?

@zimbatm

This comment has been minimized.

Show comment
Hide comment
@zimbatm

zimbatm Sep 26, 2016

Member

Maybe ask the RVM project? I'm not very well placed to answer that question @diclophis

Member

zimbatm commented Sep 26, 2016

Maybe ask the RVM project? I'm not very well placed to answer that question @diclophis

@BardiaAfshin

This comment has been minimized.

Show comment
Hide comment
@BardiaAfshin

BardiaAfshin Oct 10, 2016

I experienced this once I downloaded iterm2, Terminal.app was working fine. I had a stable installation of RVM, installing the master version fixed it

FIX

rvm implode
\curl -sSL https://get.rvm.io | bash -s master --ruby

BardiaAfshin commented Oct 10, 2016

I experienced this once I downloaded iterm2, Terminal.app was working fine. I had a stable installation of RVM, installing the master version fixed it

FIX

rvm implode
\curl -sSL https://get.rvm.io | bash -s master --ruby

matthew-brett added a commit to matthew-brett/multibuild that referenced this issue Oct 11, 2016

@ryanmeisters ryanmeisters referenced this issue Oct 12, 2016

Closed

Export fails for enterprise with Xcode8 #6289

2 of 2 tasks complete

kecnry added a commit to phoebe-project/phoebe2 that referenced this issue Dec 4, 2016

attempt to fix using src .envrc
currently getting /Users/travis/build.sh: line 148: shell_session_update: command not found

see direnv/direnv#210
@Yusone

This comment has been minimized.

Show comment
Hide comment
@Yusone

Yusone Dec 27, 2016

the same problem I had met , run rvm get head , it works.

Yusone commented Dec 27, 2016

the same problem I had met , run rvm get head , it works.

@fenollp

This comment has been minimized.

Show comment
Hide comment
@fenollp

fenollp Jan 9, 2017

Hey look here! I can reliably fix this issue with

after_script: set +e

Looks like you need that at the top of your /Users/travis/build.sh.

cc travis-ci/travis-ci#6307 travis-ci/travis-ci#6522 japaric/trust#47

fenollp commented Jan 9, 2017

Hey look here! I can reliably fix this issue with

after_script: set +e

Looks like you need that at the top of your /Users/travis/build.sh.

cc travis-ci/travis-ci#6307 travis-ci/travis-ci#6522 japaric/trust#47

@sobolevn

This comment has been minimized.

Show comment
Hide comment
@sobolevn

sobolevn Feb 3, 2017

Faced this issue while creating a build system inside sublime text 3. Thanks, rvm get head solved it.

sobolevn commented Feb 3, 2017

Faced this issue while creating a build system inside sublime text 3. Thanks, rvm get head solved it.

@ycanales

This comment has been minimized.

Show comment
Hide comment
@ycanales

ycanales Apr 5, 2017

@zimbatm I was having this issue with the PyCharm console, updating rvm helped. Thanks! (macOS Sierra)

ycanales commented Apr 5, 2017

@zimbatm I was having this issue with the PyCharm console, updating rvm helped. Thanks! (macOS Sierra)

@zimbatm

This comment has been minimized.

Show comment
Hide comment
@zimbatm

zimbatm Apr 6, 2017

Member
Member

zimbatm commented Apr 6, 2017

rudimeier added a commit to rudimeier/DirectionalityIndicator that referenced this issue Jun 8, 2017

travis: workaround ugly shell warning on travis OSX
There wae always a warning at the end of the log:

  /Users/travis/.travis/job_stages: line 152: shell_session_update: command not found

Also see direnv/direnv#210

rudimeier added a commit to rudimeier/DirectionalityIndicator that referenced this issue Jun 8, 2017

travis: workaround ugly shell warning on travis OSX
There wae always a warning at the end of the log:

  /Users/travis/.travis/job_stages: line 152: shell_session_update: command not found

Also see direnv/direnv#210

rudimeier added a commit to rudimeier/DirectionalityIndicator that referenced this issue Jun 8, 2017

travis: workaround ugly shell warning on travis OSX
There wae always a warning at the end of the log:

  /Users/travis/.travis/job_stages: line 152: shell_session_update: command not found

Also see direnv/direnv#210

nopara73 added a commit to nopara73/MagicalCryptoWallet that referenced this issue Feb 22, 2018

nopara73 added a commit to nopara73/MagicalCryptoWallet that referenced this issue Feb 22, 2018

benoittgt added a commit to benoittgt/travis-rubies that referenced this issue Feb 28, 2018

Fix xcode build errors
Build that was failing:
https://travis-ci.org/travis-ci/travis-rubies/jobs/347426899

Error:
```
The command "unset JRUBY_OPTS" exited with 0.
3.61s$ ./build.sh
update rvm
2.29s$ rvm remove 1.8.7
ruby-1.8.7-head - #already gone
/Users/travis/.rvm/bin/rvm: line 66: shell_session_update: command not found
/usr/local/bin/gpg
gpg: /Users/travis/.gnupg/trustdb.gpg: trustdb created
gpg: error reading key: No public key
gpg: keyserver receive failed: No route to host
The command "./build.sh" exited with 2.
```

- First error seems to be a well known issue : direnv/direnv#210
- Second error for gpg rvm/rvm#4215 (comment)

@benoittgt benoittgt referenced this issue Feb 28, 2018

Merged

Fix xcode build errors #46

3 of 3 tasks complete

benoittgt added a commit to benoittgt/travis-rubies that referenced this issue Feb 28, 2018

Fix xcode build errors for xcode7.2C
Build that was failing:
https://travis-ci.org/travis-ci/travis-rubies/jobs/347426899

Error:
```
The command "unset JRUBY_OPTS" exited with 0.
3.61s$ ./build.sh
update rvm
2.29s$ rvm remove 1.8.7
ruby-1.8.7-head - #already gone
/Users/travis/.rvm/bin/rvm: line 66: shell_session_update: command not found
/usr/local/bin/gpg
gpg: /Users/travis/.gnupg/trustdb.gpg: trustdb created
gpg: error reading key: No public key
gpg: keyserver receive failed: No route to host
The command "./build.sh" exited with 2.
```

- First error seems to be a well known issue : direnv/direnv#210
- Second error for gpg rvm/rvm#4215 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment