Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Whenever I cd or use rvm commands this shows up:

-bash: /usr/local/rvm/scripts/initialize: line 80: syntax error near unexpected token `fi'   
-bash: /usr/local/rvm/scripts/initialize: line 80: `  fi'   
-bash: /usr/local/rvm/scripts/hook: line 32: syntax error near unexpected token `fi'
-bash: /usr/local/rvm/scripts/hook: line 32: `fi'

This randomly started to happen. Any ideas?

Here are my paths:

/usr/local/rvm/gems/ruby-1.9.3-p194/bin
/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin
/usr/local/rvm/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/X11/bin
/opt/sm/bin
/opt/sm/pkg/active/bin
/opt/sm/pkg/active/sbin

Update: The problem fixed itself after I updated to OS X 10.8

share|improve this question

1 Answer 1

I can only guess now, but this would happen in restricted(limited) shell, like when bash is executed via sh link, or when run with bash -r. make sure you use login shell like bash -l, validate your shell in /etc/passwd.

share|improve this answer
    
Aren't these rvm scripts standalone, specifying the correct script interpreter? Would these particular restrictions get inherited somehow..? –  Daniel Beck Aug 5 '12 at 20:49
    
rvm is sourced into the running session, so it is running in the same shell as user opens, RVM2 will have smaller wrapper for this tasks, where all code will be running in it's own shell (separate build). –  mpapis Aug 5 '12 at 20:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.