gem and stubs

Discussion in 'Ruby' started by Ara.T.Howard, Nov 15, 2005.

  1. Ara.T.Howard

    Ara.T.Howard Guest

    what's the deal? does it support them or not? the docs are confusing on the
    matter, but the latest certainly does not support them by default and also no
    longer accepts the --install-stubs option.

    -a
    --
    ===============================================================================
    | ara [dot] t [dot] howard [at] gmail [dot] com
    | all happiness comes from the desire for others to be happy. all misery
    | comes from the desire for oneself to be happy.
    | -- bodhicaryavatara
    ===============================================================================
    Ara.T.Howard, Nov 15, 2005
    #1
    1. Advertising

  2. Ara.T.Howard wrote:
    > what's the deal? does it support them or not? the docs are confusing on the
    > matter, but the latest certainly does not support them by default and also no
    > longer accepts the --install-stubs option.


    Library stubs have been unsupported for ages. In fact, when you
    install RubyGems, it looks for any existing library stubs and removes
    them :)

    When "require" gained the ability to look for libraries in installed
    gems, library stubs were no longer needed or wanted.

    Application stubs are a different matter. If a gem includes any
    executables, they are proxied in your "bin" directory whether you like
    it or not. AFAIK, there's no option to control that.

    Gavin
    Gavin Sinclair, Nov 17, 2005
    #2
    1. Advertising

  3. Ara.T.Howard

    Ara.T.Howard Guest

    On Thu, 17 Nov 2005, Gavin Sinclair wrote:

    >
    > Ara.T.Howard wrote:
    >> what's the deal? does it support them or not? the docs are confusing on the
    >> matter, but the latest certainly does not support them by default and also no
    >> longer accepts the --install-stubs option.

    >
    > Library stubs have been unsupported for ages. In fact, when you
    > install RubyGems, it looks for any existing library stubs and removes
    > them :)


    yup. you are quite right. i missed that. they really should be there as an
    option though. otherwise this doesn't work

    irb -r postgres # postgres stub is installed

    i liked that stubs were totally transparent to user code - they needed do a
    'require "rubygems"'

    oh well...

    > When "require" gained the ability to look for libraries in installed gems,
    > library stubs were no longer needed or wanted.
    >
    > Application stubs are a different matter. If a gem includes any
    > executables, they are proxied in your "bin" directory whether you like it or
    > not. AFAIK, there's no option to control that.


    hmmm. thanks for the insight.

    cheers.

    -a
    --
    ===============================================================================
    | ara [dot] t [dot] howard [at] gmail [dot] com
    | all happiness comes from the desire for others to be happy. all misery
    | comes from the desire for oneself to be happy.
    | -- bodhicaryavatara
    ===============================================================================
    Ara.T.Howard, Nov 17, 2005
    #3
  4. Ara.T.Howard

    Eric Hodel Guest

    On Nov 16, 2005, at 7:42 PM, Gavin Sinclair wrote:

    > Ara.T.Howard wrote:
    >> what's the deal? does it support them or not? the docs are
    >> confusing on the
    >> matter, but the latest certainly does not support them by default
    >> and also no
    >> longer accepts the --install-stubs option.

    >
    > Library stubs have been unsupported for ages. In fact, when you
    > install RubyGems, it looks for any existing library stubs and removes
    > them :)
    >
    > When "require" gained the ability to look for libraries in installed
    > gems, library stubs were no longer needed or wanted.
    >
    > Application stubs are a different matter. If a gem includes any
    > executables, they are proxied in your "bin" directory whether you like
    > it or not. AFAIK, there's no option to control that.


    $ gem install --help
    Options:
    -v, --version VERSION Specify version of gem to install
    -l, --local Restrict operations to the
    LOCAL domain (default)
    -r, --remote Restrict operations to the
    REMOTE domain
    -b, --both Allow LOCAL and REMOTE operations
    -i, --install-dir DIR
    -d, --[no-]rdoc Generate RDoc documentation for
    the gem on install
    -f, --[no-]force Force gem to install, bypassing
    dependency checks
    -t, --[no-]test Run unit tests prior to
    installation
    -w, --[no-]wrappers Use bin wrappers for executables
    Not available on dosish platforms
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Courtesy the Seattle.rb Rubygems Hackfest

    --
    Eric Hodel - - http://segment7.net
    FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04
    Eric Hodel, Nov 17, 2005
    #4
  5. Ara.T.Howard wrote:
    >
    > > Library stubs have been unsupported for ages. In fact, when you
    > > install RubyGems, it looks for any existing library stubs and removes
    > > them :)

    >
    > yup. you are quite right. i missed that. they really should be there as an
    > option though. otherwise this doesn't work
    >
    > irb -r postgres # postgres stub is installed


    Yes, that's the benefit, but it's a shallow convenience, at the cost of
    spewing crap in the filesystem.

    Why not:

    alias irb="irb -r rubygems"

    ?

    Or a special alias for a postgres-enabled irb if that's something you
    use often.

    Gavin
    Gavin Sinclair, Nov 18, 2005
    #5
    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. Duncan Strang
    Replies:
    0
    Views:
    438
    Duncan Strang
    Jan 29, 2004
  2. ilyas

    Stubs and Skeleton Eclipse

    ilyas, Dec 7, 2004, in forum: Java
    Replies:
    1
    Views:
    4,530
    Dirk Gerrit Oort
    Dec 7, 2004
  3. Lar
    Replies:
    0
    Views:
    1,730
  4. Ara.T.Howard

    gem bin stubs

    Ara.T.Howard, Oct 27, 2005, in forum: Ruby
    Replies:
    3
    Views:
    138
    Eric Hodel
    Oct 27, 2005
  5. Austin 7873
    Replies:
    5
    Views:
    171
    Eric Hodel
    Jan 27, 2007
Loading...

Share This Page