Hi Sam,
I tried installing your gem on my Windows 2000 Cygwin Ruby 1.8.4 Gem
0.8.10 setup. Everything worked fine running test_date.rb from 0.15
(it was convenient) and running a few of the samples from the vpim
README at vpim.rubyforge.org However I''ve noticed that the way you
have called your gem in the below quoted example will not work. Gems
can be included with require_gem (in which case only the top level
appears accessible) or by adding ''-rubygems'' (only one r, not
''-rrubygems'') and just requiring as normal in your code. This
is the
preferred method because then code doesn''t have to be different if
vpim is a gem vs if it is installed from tgz. To convert your
example:
$ /usr/bin/ruby -e "require ''vpim/vpim''; p
Vpim::VERSION"
-e:1:in `require'': no such file to load -- vpim/vpim (LoadError)
from -e:1
$ /usr/bin/ruby -rubygems -e "require ''vpim/vpim''; p
Vpim::VERSION"
"0.18"
An alternative way to add command line arguments to ruby is to set
RUBYOPTS (''export'' is of course for bash, use
''set'' or whatever your
shell requires).
$ export RUBYOPT=rubygems
RKaufma2 at WASPUS7147 ~/down
$ /usr/bin/ruby -e "require ''vpim/vpim''; p
Vpim::VERSION"
"0.18"
Hope That Helps,
Rob Kaufman
On 3/18/06, Sam Roberts <sroberts at uniserve.com>
wrote:> Quoting anejr at alevans.com, on Fri, Mar 17, 2006 at 02:03:22PM -0500:
> > Installed via "gem install". It thinks it''s
installed correctly:
> > alsmini:~ al$ irb
> > irb(main):001:0> require ''rubygems''
> > => true
> > irb(main):002:0> require_gem ''vpim/maker/vcard''
>
> It doesn''t appear that you can require specific files within a
gem, I''m
> not sure what I can do about this, does anybody have suggestions?
>
> ensemble:~/p/ruby/vpim/trunk/releases % /usr/local/bin/ruby18 -rrubygems
-e "require_gem ''vpim/vpim''; p Vpim::VERSION"
> /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:204:in
> `report_activate_error'': Could not find RubyGem vpim/vpim
(> 0.0.0) (Gem::LoadError)
>
>
> I added a top-level vpim.rb that requires all the parts currently
> implemented, and requiring that file seems to work:
>
> ensemble:~/p/ruby/vpim/trunk/releases % /usr/local/bin/ruby18 -rrubygems
-e "require_gem ''vpim''; p Vpim::Maker::Vcard"
> Vpim::Maker::Vcard
> ensemble:~/p/ruby/vpim/trunk/releases % /usr/local/bin/ruby18
-rrubygems -e "require_gem ''vpim''; p Vpim::VERSION"
> "0.18"
>
> Could you give the attached gem a whirl, and tell me if it works for
> you, too?
>
> Thanks
> Sam
>
>
>
> _______________________________________________
> Vpim-talk mailing list
> Vpim-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/vpim-talk
>
>
>