[p4ruby] Cygwin install question

Tony Smith tony at smee.org
Fri Jul 28 08:12:29 PDT 2006


Hi Bree,

> I'm having some issues getting P4Ruby installed/configured on Windows. I
> used the Windows installer and after the installation completed I found
> that it had placed the files in C:\usr\lib\ruby\1.8. However, after the
> installation, ruby (via Cygwin) didn't know about the P4 module. I
> manually copied the P4.rb file to C:\cygwin\lib\ruby\1.8\P4 and the
> P4.so file to C:\cygwin\usr\lib\ruby\1.8\i386-cygwin, but I'm now
> getting a confusing error.
>
> The error message follows.
>
> bash-3.1$ ruby -rP4 -e 'puts( P4.identify )'
> /usr/lib/ruby/1.8/i386-cygwin/P4.so: No such file or directory -
> /usr/lib/ruby/1.8/i386-cygwin/P4.so
>  (LoadError)
> bash-3.1$

For Cygwin's Ruby (which is a completely different beast to the native Win32 
build of Ruby), you'll need to build P4Ruby from source. Download the Cygwin 
build of the Perforce API, and the P4Ruby source, and follow the build 
instructions. Let me know if you have any problems.

The Cygwin API is here: 
ftp://ftp.perforce.com/perforce/r05.1/bin.cygwinx86/p4api.tar

(2005.1 is the latest build that's posted on the FTP site, it's 
built-on-request though, so if you want a 2006.1 build contact 
support at perforce.com and ask them to request the build for you).

> I must admit that I'm a bit new to Ruby, so please bare with me, but I'm
> very keen to get this to work. I'm also interested in helping to port
> the P4Ruby bindings to OS X.

P4Ruby already runs on OS X :-). I also suspect (but haven't yet proved) that 
the nasty hack I did to make it work on older versions of OS X isn't required 
on 10.4, so it should be a pretty easy port.  If you get a chance to confirm 
that for me, I'd appreciate it.

Thanks,

Tony



More information about the p4ruby mailing list