Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > gem and stubs

Reply
Thread Tools

gem and stubs

 
 
Ara.T.Howard
Guest
Posts: n/a
 
      11-15-2005

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
================================================== =============================



 
Reply With Quote
 
 
 
 
Gavin Sinclair
Guest
Posts: n/a
 
      11-17-2005

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

 
Reply With Quote
 
 
 
 
Ara.T.Howard
Guest
Posts: n/a
 
      11-17-2005
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
================================================== =============================

 
Reply With Quote
 
Eric Hodel
Guest
Posts: n/a
 
      11-17-2005
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




 
Reply With Quote
 
Gavin Sinclair
Guest
Posts: n/a
 
      11-18-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RubyGems 0.9.1 calling a gem with gem '<gem>' Austin 7873 Ruby 5 01-27-2007 10:05 PM
Simple EJB, stubs, and Websphere studio question Lar Java 0 11-28-2005 10:46 PM
gem bin stubs Ara.T.Howard Ruby 3 10-27-2005 07:39 AM
Stubs and Skeleton Eclipse ilyas Java 1 12-07-2004 04:59 PM
manually generate EJB stubs for appserver7 Duncan Strang Java 0 01-29-2004 01:30 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57