setup.rb and shared data

Discussion in 'Ruby' started by Stefan Rusterholz, Sep 1, 2007.

  1. 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-forum.com/.
     
    Stefan Rusterholz, Sep 1, 2007
    #1
    1. Advertising

  2. 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-forum.com/.
     
    Stefan Rusterholz, Sep 1, 2007
    #2
    1. Advertising

  3. 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
     
    Nobuyoshi Nakada, Sep 2, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe Fallon
    Replies:
    3
    Views:
    777
    =?Utf-8?B?Z3V5?=
    Jul 16, 2004
  2. ben
    Replies:
    3
    Views:
    524
    Kevin Spencer
    Nov 15, 2004
  3. HmFireBall
    Replies:
    2
    Views:
    531
    HmFireBall
    Jan 2, 2006
  4. Chris Shenton
    Replies:
    1
    Views:
    1,470
    =?ISO-8859-1?Q?Michael_Str=F6der?=
    Aug 24, 2007
  5. Intransition

    [ANN] Ruby Setup 5 (setup.rb)

    Intransition, Jan 13, 2010, in forum: Ruby
    Replies:
    0
    Views:
    429
    Intransition
    Jan 13, 2010
Loading...

Share This Page