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

Discussion in 'Ruby' started by Mark Moseley, Sep 16, 2009.

  1. Mark Moseley

    Mark Moseley Guest

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

    Run, under Ruby 1.9:
    ruby foo.rb asdf

    Gets error:
    foo.rb:1:in `<main>': 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?
    --
    Posted via http://www.ruby-forum.com/.
    Mark Moseley, Sep 16, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonathan Kohl

    Error using csv.rb - (Errno::ENOENT)

    Jonathan Kohl, Apr 5, 2005, in forum: Ruby
    Replies:
    2
    Views:
    323
    Jonathan Kohl
    Apr 6, 2005
  2. amos
    Replies:
    1
    Views:
    294
    Eric Hodel
    Jan 22, 2007
  3. Salil Gaikwad
    Replies:
    0
    Views:
    229
    Salil Gaikwad
    May 5, 2009
  4. Intransition

    FileUtils.mv Pointless Errno::ENOENT

    Intransition, Sep 6, 2009, in forum: Ruby
    Replies:
    2
    Views:
    171
    7stud --
    Sep 12, 2009
  5. Michael R.
    Replies:
    6
    Views:
    822
    Michael R.
    Feb 3, 2010
Loading...

Share This Page