List Info

Thread: Ruby 1.9 Pathname.new('/usr/bin') equivalent?




Ruby 1.9 Pathname.new('/usr/bin') equivalent?
country flaguser name
United States
2008-05-19 12:39:00

Hi again, please let me know if this should go to Ruby Talk instead.  I could not find the answer anywhere.

I have code that currently does this:

        path = Pathname.new('/usr/bin')
        puts path.realpath

But Ruby 1.9 (trunk) errors out:

        $ /usr/local/ruby-1.9/bin/irb
        irb(main):002:0> require 'pathname'
        => true
        irb(main):003:0> Pathname.new('/usr/bin')
        ArgumentError: wrong number of arguments(1 for 0)
                       from (irb):3:in `initialize'
                       from (irb):3:in `new'
                       from (irb):3
            &nbsp;           from /usr/local/ruby-1.9/bin/irb:12:in `<main>'

What is the Ruby 1.9 equivalent?

Thanks,

Nate Wiger
PlayStation
Nevermind (Re: Ruby 1.9 Pathname.new('/usr/bin') equivalent?)
country flaguser name
United States
2008-05-19 13:03:00

Nevermind, this question is invalid.  I had RUBYLIB set which was causing problems with mixing libraries.

-Nate
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )