Error occurs when trying to install Homebrew on a

2020-04-21 01:06发布

问题:

I am trying to install Homebrew on my mac with OS 10.8.5 and I am getting an error.

I enter the following into terminal:

    ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go/install)"

and I get the following error

    /Users/marlonmarescia/.rbenv/shims/ruby: line 21: /usr/local/Cellar/rbenv/0.4.0/libexec/rbenv: No such file or directory

回答1:

It looks like you're not using the system ruby, but a ruby via rbenv which you installed via homebrew. Try:

/usr/bin/ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go/install)"


回答2:

This worked for me

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


回答3:

First i tried this: It was solved by removing line eval

  $(rbenv init -)

in my ~/.bash_profile. It didn't work for me.

So I Removed the .rbenv in the /users/ur-username/ path. To remove it you can use this command.

 $rm -Rf .rbenv

Then go ahead and run the install script. This worked for me.



回答4:

I have solved this issue. It was a whitespace issue in my application.yml file. I did not format this file correctly as YAML is whitespace sensitive unlike Ruby. Once the file was formatted using tabs or double spaces the rails server worked again.