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

ZSH version detection broken (use user shell to check for zsh & version) #2029

Closed
eproxus opened this issue Jul 12, 2013 · 27 comments
Closed
Assignees
Milestone

Comments

@eproxus
Copy link

eproxus commented Jul 12, 2013

The following notice is given when running rvm get head even though the Zsh version is correct (on OS X):

Upgrade Notes:


  * WARNING: In case of using Zsh, version 4.3.12 / 5.0.0+ is recommended, you have 4.3.11, errors to be expected.

  * No new notes to display.

RVM reloaded!

$ which zsh
/usr/local/bin/zsh
$ echo $ZSH_VERSION
5.0.2
@mpapis
Copy link
Member

mpapis commented Jul 12, 2013

can you run: which -a zsh

@eproxus
Copy link
Author

eproxus commented Jul 12, 2013

» which -a zsh
/usr/local/bin/zsh
/bin/zsh
/usr/local/bin/zsh

@mpapis
Copy link
Member

mpapis commented Jul 12, 2013

has to be the /bin/zsh version could you confirm?

@eproxus
Copy link
Author

eproxus commented Jul 12, 2013

Yup:

» /bin/zsh
» echo $ZSH_VERSION
4.3.11

@mpapis
Copy link
Member

mpapis commented Jul 12, 2013

please check with rvm get head and rvm notes

@eproxus
Copy link
Author

eproxus commented Jul 12, 2013

rvm get head now doesn't show any notice anymore. Nice work, thanks!

@eproxus eproxus closed this as completed Jul 12, 2013
@s10wen
Copy link

s10wen commented Jul 17, 2013

I just did \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable and also got * WARNING: In case of using Zsh, version 4.3.12 / 5.0.0+ is recommended, you have 4.3.11, errors to be expected. I'm setting up a new mac and so far have installed Xcode (and the Command Line Tools) and Homebrew, haven't installed Zsh afaik.

Should I have installed Zsh before rvm?

I have the full log if you'd like it, but not sure what the following are:

?

stty: stdin isn't a terminal

Ignored

/Users/simonowen/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rdoc/parser.rb:87: warning: Unsupported encoding : ignored
/Users/simonowen/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rdoc/parser.rb:87: warning: Unsupported encoding  ignored

Skipping

unable to convert "\x80" from ASCII-8BIT to UTF-8 for lib/mail/values/unicode_tables.dat, skipping

Please can you let me know what the above logs mean and if you have any further advice. 🎱

@mpapis
Copy link
Member

mpapis commented Jul 17, 2013

@simonowendesign as the first message says In case of using Zsh - so it matters only if you explicitly want to use Zsh - if unsure - means you do not want. as for rest of the messages they look harmless, except stty: stdin isn't a terminal - but for that open a new ticket with full log, not just single line of the output.

@s10wen
Copy link

s10wen commented Jul 17, 2013

Cool, thanks, new ticket = #2043.

After digging around in Finder I found /usr/lib/zsh/4.3.11 so looks like I'm on the wrong version, although I'm not sure where zsh came from (any ideas?). On my previous machine I threw a bunch of stuff together and got a load of nice stuff up and running: http://simonowendesign.co.uk/blog/2012/12/02/mother-effing-dotfiles/

This time I'm trying to get to grips with it all and find out what I'm actually doing 😄

@mpapis
Copy link
Member

mpapis commented Jul 17, 2013

let me rephrase, Zsh and especially OH-MY-ZSH do not bring much, most of the things can be done also in bash, which is more stable and does not break something so often like zsh

@s10wen
Copy link

s10wen commented Jul 17, 2013

So as I somehow have Zsh should I delete it (if so what's the best way?) and run \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable again?

@mpapis
Copy link
Member

mpapis commented Jul 18, 2013

just ignore it

@eproxus
Copy link
Author

eproxus commented Jul 18, 2013

OS X comes with Zsh preinstalled. I think this warning should only be issued if the user actually uses Zsh.

@mpapis
Copy link
Member

mpapis commented Jul 18, 2013

there is no way to detect if user uses Zsh, the warning is displayed from within bash script, you can tell only if Zsh is used while the script is executing in Zsh.

@s10wen
Copy link

s10wen commented Jul 18, 2013

Cool, thanks for clarifying 🎩

@eproxus
Copy link
Author

eproxus commented Jul 22, 2013

On OS X you can find out with:

» dscl localhost -read /Local/Default/Users/<USERNAME> shell
dsAttrTypeNative:shell: /usr/local/bin/zsh

On Linux, it should be even easier (check '/etc/passwd').

@mpapis mpapis reopened this Jul 22, 2013
@ghost ghost assigned mpapis Jul 22, 2013
@s10wen
Copy link

s10wen commented Jul 22, 2013

dscl localhost -read /Local/Default/Users/simonowen shell gave me this if it's any help.

dsAttrTypeNative:shell: /bin/bash

@mpapis mpapis closed this as completed in e034c4e Jul 22, 2013
@mpapis
Copy link
Member

mpapis commented Jul 22, 2013

please let me know if there are any issues with the new code

@jhogendorn
Copy link

I'm experiencing this issue currently, even after running rvm get head. My circumstances are exactly the same as the OP. Not sure what information is relevant to provide to debug? RVM in general seems to behave oddly on my setup, as if it is not loading my environment.

@mpapis
Copy link
Member

mpapis commented Oct 2, 2013

start with giving me:

echo $USER
echo $SHELL
which -a zsh
dscl localhost -read /Local/Default/Users/$USER shell

@jhogendorn
Copy link

Wow, speedy response. Fantastic. Here we go:

% echo $USER
jhogendorn
% echo $SHELL
/bin/bash
% which -a zsh
/usr/local/bin/zsh
/bin/zsh
% dscl localhost -read /Local/Default/Users/$USER shell
dsAttrTypeNative:shell: /bin/zsh

@mpapis
Copy link
Member

mpapis commented Oct 2, 2013

so the shell you are running is /bin/zsh what version is it?

@jhogendorn
Copy link

Ok, so it seem's I answered my own question in a way with that last command, (thanks @mpapis!)

I was not running the shell I believed I was running, for shame etc. I fixed that on OS X by doing this:

brew install zsh
echo "/usr/local/bin/zsh" | sudo tee -a /etc/shells
chsh -s /usr/local/bin/zsh

Thanks for the heads up @mpapis, running rvm get head after this showed no issues.

@anthonybrown
Copy link

I seem to having a similar problem with rvm.
After rvm get head and rvm notes,
this is what I got:

Not sure what I did?
It was working fine before and I wanted to make sure my programs come from homebrew installed software
I did this echo export PATH="/usr/local/bin:$PATH" >> ~/.zshrc
I tried deleted what it did, but it's not working

@anthonybrown
Copy link

Would updating the shell in /bin/zsh fix it?

@mpapis
Copy link
Member

mpapis commented Dec 11, 2013

@anthonybrown this is different error, please open a new issue, also are you aware that ruby 1.9.1 is no more maintained, you should try rather ruby 1.9.3 but as it's losing maintenance with end of this year, so better use ruby 2.0.0, or if it is a new app - 2.1.0 (it's preview2, but will be released in 2 weeks)

@anthonybrown
Copy link

Okay, thanks @mpapis
I was just testing to see if rvm still worked after
the #$@* up

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

5 participants