# Errno::ENOENT when evaluating $FILENAME in 1.9.x

**URL:** <https://www.ruby-forum.com/t/errno-enoent-when-evaluating-filename-in-1-9-x/175619>\
**Category:** Ruby\
**Created:** [September 16, 2009, 4:25pm UTC](https://www.ruby-forum.com/t/errno-enoent-when-evaluating-filename-in-1-9-x/175619 "2009-09-16T16:25:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mark](https://www.ruby-forum.com/u/mark)\
**Post date:** [September 16, 2009, 4:25pm UTC](https://www.ruby-forum.com/t/errno-enoent-when-evaluating-filename-in-1-9-x/175619/1 "2009-09-16T16:25:06Z")

</div>

Given foo.rb with the single line:  
puts $FILENAME

Run, under Ruby 1.9:  
ruby foo.rb asdf

Gets error:  
foo.rb:1:in `’: No such file or directory - asdf (Errno::ENOENT)

This duplicates the way the Rails passes the webserver name (ie  
“script/server webrick”)

Under Ruby 1.8.6, I get the output “-”; no exception.

Is this a problem with Ruby 1.9, Rails, or something else?
