Rails: Bad Interpreter

I've recently faced this problem in rails. Almost every code I've entered return an error, saying there's a bad interpreter. The following are some of the errors I've been facing lately:

bundle install

sh exe": /c/Program Files (x86)/ruby-1.9.3/bin/bundle: "c:/Program: bad interpreter: No such file or directory

rake db:migrate

sh exe": /c/Program Files (x86)/ruby-1.9.3/bin/rake: "c:/Program: bad interpreter: No such file or directory

Does anyone know how to solve this problem? Even my reinstalling rails multiple times, I'm unable to solve this error.

Answers


It seems it doesn't like the space in the path ...

Can you reinstall everything in a path without spaces? It usually is safer


SOLUTION:

There shouldn't be spaces in the path name. To solve this, you can either:

1) Add quotes (" ") to your path. Example is as follows:

C:\Program Files (x86)\ruby-1.9.3\bin will become "C:\Program Files (x86)\ruby-1.9.3\bin"

2) Reinstall in a new non-spacing path


Need Your Help

CGLIB not able to intercept methods in a superclass/superinterface

java proxy cglib

May be I'm not thinking hard enough or the answer is really elusive. Quick scenario (Try the code out. It compiles).

Beautifulsoup findall get stuck without processing

python web-scraping beautifulsoup

I'm trying to understand BeautifulSoup and tried want to find all the links within facebook.com and iterate each and every link within it...