1
When I run brew list
on my Mac OS X EI Capitan, it will always give me errors message like this --
$ brew list
/bin/sh: __rvm_ruby_string_find: line 8: syntax error near unexpected token `('
/bin/sh: __rvm_ruby_string_find: line 8: ` ruby-+([1-9]) | ruby-+([1-9]).+([0-9]) | ruby-1.+([1-9]).+([0-9]) | jruby-[19]*)'
/bin/sh: error importing function definition for `__rvm_ruby_string_find'
/bin/sh: __rvm_project_ruby_env_load_parse_file: line 9: syntax error near unexpected token `('
/bin/sh: __rvm_project_ruby_env_load_parse_file: line 9: ` __rvm_read_lines __variables <( { cat "$1"; echo ""; } | __rvm_sed "${__sed_commands[@]}" )'
/bin/sh: error importing function definition for `__rvm_project_ruby_env_load_parse_file'
/bin/sh: __rvm_remove_without_gems: line 2: syntax error near unexpected token `('
/bin/sh: __rvm_remove_without_gems: line 2: ` __rvm_read_lines __gems_to_remove <('
/bin/sh: error importing function definition for `__rvm_remove_without_gems'
gdbm openssl python readline sqlite
Image Link
Every time running rvm, it will also give me similar error message.
$ rvm
bash: __rvm_ruby_string_find: line 8: syntax error near unexpected token `('
bash: __rvm_ruby_string_find: line 8: ` ruby-+([1-9]) | ruby-+([1-9]).+([0-9]) | ruby-1.+([1-9]).+([0-9]) | jruby-[19]*)'
bash: error importing function definition for `__rvm_ruby_string_find'
How can I resolve it? Thanks!
I just ran the command above, but it still gave me same error. So when you say checking the path, how can I make sure
/usr/local/bin/ruby
is in my path. Where can I check it? .profile? – Haoyu Chen – 2015-11-05T06:33:14.340I print out the $PATH, I can;t find /usr/local/bin/ruby, so does it mean that I need to add it by myself? – Haoyu Chen – 2015-11-05T06:35:29.533
Check the path with
echo $PATH
. Then runbrew install ruby
. Read the console output. Most packages will make you aware of any special changes you need to make. If the ruby package does not mention it, then you can add something likePATH='/usr/local/bin/ruby:${PATH}'
to your bash profile – SaxDaddy – 2015-11-05T06:42:43.653it doesn't solve the problem and it still give me same error. After I add the path to $PATH and reinstall ruby by command -- brew install ruby. – Haoyu Chen – 2015-11-05T14:32:04.783
have you tried uninstalling and then reinstalling homebrew? – SaxDaddy – 2015-11-06T07:58:58.083
I tried it, but it looks like it has nothing to do with homebrew. When I install homebrew, it will also give me the error message. http://postimg.org/image/gadkva8rv/
– Haoyu Chen – 2015-11-07T23:06:27.170It's ruby's issue...Very possible. Still can't figure it out :( – Haoyu Chen – 2015-11-07T23:06:58.110