rvm problems syntax error near unexpected token `fi'

2

1

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

gdi2290

Posted 2012-07-21T23:23:06.073

Reputation: 163

Answers

0

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.

mpapis

Posted 2012-07-21T23:23:06.073

Reputation: 300

Aren't these rvm scripts standalone, specifying the correct script interpreter? Would these particular restrictions get inherited somehow..? – Daniel Beck – 2012-08-05T20:49:10.547

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 – 2012-08-05T20:51:15.537