Los Techies : Blogs about software and anything tech!

“Bad Interpreter: No Medium” error when running Ruby from Git Bash


I opened my Windows VM last night for the first time in months to finally work on a .NET project from Github.  When I found out I needed the rspec gem installed (I'm normally a shoulda guy), I decided to see what gems I had installed first:

gem list

and got the following error:

$ gem list
sh.exe": /c/Ruby/bin/gem: D:/Users/Luis/projects/oss/oci/installer2-trunk/ruby/bin/ruby.exe: bad interpreter: no medium

Umm..... D:/Users/Luis? After some googling I found this article on StackOverflow that directed me to this blog.  It pretty much states that the shebang line (#!) at the top of my Ruby One-Click installer file had changed/been corrupted, I don't know.  I changed the line to point to my ruby exe (#!C:\Ruby\bin\ruby.exe) and my gem commands started working again.

Kick It on DotNetKicks.com
Posted Oct 06 2009, 10:50 AM by Jason Meridth
Filed under: , ,

Comments

derick.bailey wrote re: “Bad Interpreter: No Medium” error when running Ruby from Git Bash
on 10-07-2009 12:57 PM

dude, i can't tell you how many times this error has frustrated the crap out of me! thanks for the post and providing a link to the solution.

 -derick

Jason Meridth wrote re: “Bad Interpreter: No Medium” error when running Ruby from Git Bash
on 10-07-2009 1:13 PM

@Derick

Glad it helped.  I was baffled that some random guys path was on my system.  :)

Copyright Los Techies 2008, 2009. All rights reserved.
Powered by Community Server (Commercial Edition), by Telligent Systems