[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

setup.rb and shared data

Stefan Rusterholz

9/1/2007 12:38:00 PM

Hi

I'm using rake+setup.rb to create a gem. It has a data-dir which is
supposed to go into the shared data directory. My issue now is: how do I
know in the executable where that data-dir went?
Similar thing for the conf directory.

Regards
Stefan
--
Posted via http://www.ruby-....

2 Answers

Stefan Rusterholz

9/1/2007 2:23:00 PM

0

Stefan Rusterholz wrote:
> Hi
>
> I'm using rake+setup.rb to create a gem. It has a data-dir which is
> supposed to go into the shared data directory. My issue now is: how do I
> know in the executable where that data-dir went?
> Similar thing for the conf directory.
>
> Regards
> Stefan

Thanks to cout in irc.freenode.org/#ruby-lang I solved my problem. In
case somebody googles this thread due to the same problem, here's the
solution:
require 'rbconfig'
data_dir = Config::CONFIG['datadir']

Regards
Stefan
--
Posted via http://www.ruby-....

Nobuyoshi Nakada

9/2/2007 2:54:00 AM

0

Hi,

At Sat, 1 Sep 2007 23:22:48 +0900,
Stefan Rusterholz wrote in [ruby-talk:267082]:
> > I'm using rake+setup.rb to create a gem. It has a data-dir which is
> > supposed to go into the shared data directory. My issue now is: how do I
> > know in the executable where that data-dir went?
> > Similar thing for the conf directory.
>
> Thanks to cout in irc.freenode.org/#ruby-lang I solved my problem. In
> case somebody googles this thread due to the same problem, here's the
> solution:
> require 'rbconfig'
> data_dir = Config::CONFIG['datadir']

If you want put architecture dependent files, they shouldn't go
the shared data directory, use 'libexecdir' instead.

--
Nobu Nakada