From: Mike Stok Date: 2013-06-30T08:44:19+09:00 Subject: Re: #!/usr/bin/env: No such file or directory On 2013-06-29, at 7:15 PM, Todd Sterben wrote: > I changed my text editor and it works. Hidden characters? > > -- > Posted via http://www.ruby-forum.com/. It *might be* the line endings. If I have "DOS" style line endings in a file then on Linux I see: vagrant@precise64:/vagrant$ cat try.rb #!/usr/bin/env ruby puts "Hello" vagrant@precise64:/vagrant$ ls -l try.rb -rwxrwxr-x 1 vagrant vagrant 37 Jun 29 23:38 try.rb vagrant@precise64:/vagrant$ ./try.rb : No such file or directory On my Mac trying the same thing I get a more obvious clue: ratdog:vagrant_book_example mike$ ./try.rb env: ruby\r: No such file or directory Which tells me there is a \r at the end of the #! line. I often use the file command to check, again on Linux: vagrant@precise64:/vagrant$ file try.rb try.rb: a ruby\015 script, ASCII text executable, with CRLF line terminators The CRLF is one give-away. Hope this helps, Mike -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply.