RubyGems for a Library

B

Bill Atkins

I've written a library that I plan to distribute as a RubyGem, but I
think it's a little crazy to require all users of this library to do

require 'rubygems' # or RUBY_OPT="-rubygems"
require_gem 'oscar'

Can't I tell RubyGems to install my gem straight to the RUBY_LIB
directory instead of having it go into its own separate folder?
Ideally, users should install my library and then just do "require
'oscar' "

I think the separate folders are fine for applications, but for
libraries, I don't really see how they help.

Bill
 
C

Chad Fowler

I've written a library that I plan to distribute as a RubyGem, but I
think it's a little crazy to require all users of this library to do

require 'rubygems' # or RUBY_OPT="-rubygems"
require_gem 'oscar'

Can't I tell RubyGems to install my gem straight to the RUBY_LIB
directory instead of having it go into its own separate folder?

No. You can't. We used to install stubs, but they were messy, so we
took it out. We've also discussed (since RubyConf, actually) the idea
of doing a "gem deploy" or something like that which would move a
gem'd version of an installed lib to the RUBY_LIB directory. We
obviously still haven't done this. If you're interested in this
feature and have some free time, patches are welcome. ;)
Ideally, users should install my library and then just do "require
'oscar' "

Yea, that's what the RUBYOPT thing is for.

--

Chad Fowler
http://chadfowler.com
http://rubycentral.org
http://rubygarden.org
http://rubygems.rubyforge.org (over 50,000 gems served!)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,166
Messages
2,570,907
Members
47,448
Latest member
DeanaQ4445

Latest Threads

Top