2

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

2 Answers 2

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.

2
  • Aren't these rvm scripts standalone, specifying the correct script interpreter? Would these particular restrictions get inherited somehow..?
    – Daniel Beck
    Aug 5, 2012 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, 2012 at 20:51
0

Just reinstall rvm - that fixed my issue

\curl -sSL https://get.rvm.io | bash -s stable 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .