I am trying to launch some AppScale Instances. When I try to execute
/bin/appscale-run-instances
I get an error like this:
-bash: bin/appscale-run-instances: /usr/bin/ruby: bad interpreter: No such file or directory
The Image that I’m trying to run is a KVM image (I’m trying to create a Virtual cluster).
What does this error mean? Is there something wrong with my Ruby installation?
this means that one of these things is happening:
You have a broken Ruby installation
You have more than one Ruby installation
Your installation has not been configured properly.
To identify if this is the first case, you can run
rubyand see if you get any response.If you don’t, your installation is broken and you need to reinstall it. If you do, you then run which ruby. This should give you the absolute path to your Ruby executable. If this is anything other than
/usr/bin/rubythen homebrew (and a bunch of other programs) will not be able to find it.In case you have not ever tampered with your Ruby installation, you can check to see if
/usr/bin/rubyalready exists or not:cat /usr/bin/ruby. If you get No such file or directory, then you can easily create a symbolic link to your Ruby installation. Assuming the output of which ruby to by/usr/local/bin/ruby, you create the symbolic link this way:sudo ln -s /usr/local/bin/ruby /usr/bin/rubyand all should be well.If there is a file at that location, you can run file
/usr/bin/rubyto see if it’s a real file, a symbolic link, or a curropted file. If it is a symbolic link, your installation should be working, and since it’s not, it probably is either a corrupted symlink or it’s a bogus file.You can remedy that by first deleting it
(sudo rm /usr/bin/ruby)and then creating a new symlink to the correct location(sudo ln -s /usr/local/bin/ruby /usr/bin/ruby).If non of the above works, you should consult the homebrew team after a clean install of Xcode and removing any traces of a Ruby installation on your system.