Automatico
Automatico

Reputation: 12926

Bundle command not found. Bad Interpreter

I am having some issues with the bundler gem.

When I run "gem list" I can see that bundler is installed. "bundler (1.1.3, 1.0.21)".

However, when I try to run the command "bundle" I get the following message:

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

I assume that this is some path errors, but no matter how much I google, I am not able to find a solution to my problem.

Anyone have any tips?

Here are my paths:

C:\Program Files (x86)\AMD APP\bin\x86_64;
C:\Program Files (x86)\AMD APP\bin\x86;
C:\Program Files\Common Files\Microsoft Shared\Windows Live;
C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;
%SystemRoot%\system32;
%SystemRoot%;    
%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;
C:\Windows\system32\gs\gs8.71\bin;
C:\Program Files (x86)\Windows Live\Shared;
C:\DevKit\bin;
C:\Program Files (x86)\Common Files\Autodesk Shared\;
C:\Program Files\Common Files\Autodesk Shared\;
C:\Program Files\TortoiseSVN\bin;
C:\Program Files (x86)\Autodesk\Backburner\;
F:\Program Files (x86)\Mozart\bin;
C:\Program Files (x86)\ruby-1.9.3\lib\ruby\gems\1.9.1\gems\rails-3.0.9\bin;
C:\Ruby192\lib\ruby\gems\1.9.1\gems\rake-0.9.2\bin;
W:\wamp\bin\mysql\mysql5.5.16\lib;
F:\Program Files\MATLAB\R2011b\bin;
F:\Program Files (x86)\Heroku\bin;
C:\Program Files (x86)\ruby-1.9.3\bin;
C:\Program Files (x86)\git\bin;
C:\Program Files (x86)\git\cmd

Upvotes: 2

Views: 3684

Answers (1)

Benjamin Cox
Benjamin Cox

Reputation: 6120

The error you're seeing indicates that the logic inside the script is looking for another item under C:\Program Files... and, for some reason, whatever it's looking for was not surrounded by quotes.

So, it thinks each piece of that path that's separated by a space is a separate argument. My guess is that it's trying to run 'ruby' from the appropriate PATH variable, so:

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

which is interpreted as you calling

C:\Program

with the arguments "Files" and "(x86)\ruby-1.9.3\bin\ruby". You can see why that wouldn't work ;-)

I don't know enough about your environment to tell you how to fix it, but if you are adding these things to your PATH manually then you should surround each one in quotes, in which case:

C:\Program Files (x86)\ruby-1.9.3\bin;

would become:

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

Upvotes: 5

Related Questions