PlayHardGoPro PlayHardGoPro - 6 months ago 25
Ruby Question

/My/path bad interpreter: No such file or directory

I just followed This Guide.

Installed Jekyll:

$ gem install jekyll
Successfully installed jekyll-3.2.1
Parsing documentation for jekyll-3.2.1
Done installing documentation for jekyll after 1 seconds
1 gem installed

But now when I try to run a command from prompt such as:

jekyll --help
. it gives that message:

bash: /g/Arquivos e Programas/Ruby23-x64/bin/jekyll: "G:/Arquivos: bad interpreter: No such file or directory

And if I go through that path, it has 2 files named

A normal file and a bash file.

What's wrong ?


Something wasn't prepared for a path with spaces in it. Spaces in paths are very common on Windows, but not at all common on Unix for this very reason.

Bash was trying to run /g/Arquivos e Programas/Ruby23-x64/bin/jekyll which it interpreted as run the program /g/Arquivos with the arguments e, and Programas/Ruby23-x64/bin/jekyll. It would have to be quoted like, '/g/Arquivos e Programas/Ruby23-x64/bin/jekyll' or the spaces escaped like /g/Arquivos\ e\ Programas/Ruby23-x64/bin/jekyll

The simple fix is to install Ruby to a path with no spaces in it. Like G:\Ruby\.

The proper fix... well, there's likely to be a TON of places which will be broken by a path with spaces in it. Report the bug to jekyll.