# Re: Pathname bug on Windows box?

**URL:** <https://www.ruby-forum.com/t/re-pathname-bug-on-windows-box/93540>\
**Category:** Ruby\
**Created:** [April 4, 2006, 4:34pm UTC](https://www.ruby-forum.com/t/re-pathname-bug-on-windows-box/93540 "2006-04-04T16:34:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [April 4, 2006, 4:34pm UTC](https://www.ruby-forum.com/t/re-pathname-bug-on-windows-box/93540/1 "2006-04-04T16:34:12Z")

</div>

> — test.rb —
> 
> always produces:
> 
> c:/ruby/lib/ruby/1.8/pathname.rb:341:in `lstat': Invalid argument - /c: (Errno::EINVAL) from c:/ruby/lib/ruby/1.8/pathname.rb:341:in`realpath’  
> from test.rb:2
> 
> any ideas? seems like Pathname doesn’t support windows at all?

Use pathname2 instead:

C:\eclipse\workspace\>pwd  
C:\eclipse\workspace

C:\eclipse\workspace\>irb  
irb(main):001:0\> require ‘pathname2’  
=\> true  
irb(main):002:0\> Pathname.new(’.’).realpath  
=\> “C:\eclipse\workspace”

Regards,

Dan
