Werner Schuster (murphee) wrote:
> Christopher Williams wrote:
>> We're having a few people trip over this. We expect the directory which
>> contains bin/ruby and lib underneath it. So for most unix installs, the
>> right directory to choose is /usr or /usr/local.
> 
> This'll be a usability problem, so how about this:
> 
> Windows: No problem, I guess (Ruby is probably always installed
> somewhere in C:\Program Files and users will know to look there);
> 
> Unix systems with package management:
>  Well, I've used Debian for 6-7 years, and I've no idea where it dumps
> its files;
>  Solution: the StandardVMInstall could say "If os == linux (or something)
>           1) look for [ /usr/bin/ruby, /usr/lib/ruby ], if that exists
> -> pre-fill the RubyHome with "/usr"
>           2) else look for [ /usr/local/bin/ruby, /usr/local/lib/ruby ]
> if that exists -> pre-fill the RubyHome with "/usr"
>           3) else: Other usual locations?
>           4) else: tough luck, user's on their own;
> 
> 
> Mac OS X:
>   It's also a Unix with package management, but where does it normally
> stuff Ruby? This location should be pre-filled too.
> 
> Comments?

Maybe, you could also try (as a step 2.5) to analyze output from:

====
ProcessBuilder pb = new ProcessBuilder("ruby", "-e",
         "require 'rbconfig';" +
         "puts Config::CONFIG['bindir'];" +
         "puts Config::CONFIG['libdir']");
====

or similar. Presumably works if the 'ruby' is on the PATH which is often 
the case (at least on Unix/Linux-like systems).

        m.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rubyeclipse-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rubyeclipse-development

Reply via email to