How do i use a newly installed gem?

Hi - I wanted to try out the Blackbook gem:

http://contentfree.rubyforge.org/blackbook/

So I did

gem install blackbook

and I kept getting failures installing, and finally I used the –
ignore-dependencies flag in gem install, and I got it installed. Now I
try to do something very simple like

contacts = Blackbook.get :username => ‘[email protected]’, :password =>
‘password’

and I get

NameError: uninitialized constant Blackbook

at both the console and in the debugger. my question is, do I have to
do something to use the newly installed gem? I’m new to gems and have
only used them for examples and such.

Thanks for any help,
Dino

Did you require the gem?

I didn’t originally, but now I did. I added:

require ‘blackbook’

and now, I get

no such file to load – blackbook

I’ve checked and blackbook.rb is installed here:

C:\ruby\lib\ruby\gems\1.8\gems\blackbook-1.0.4\lib

i don’t have any idea how ruby looks for gems or where. this error
tells me it can’t find blackbook.rb. Any ideas?

Thanks,
Dino

Is this is Rails 2.1?

If so did you look at the comments pertaining to gems in
config/environment.rb?

Example:
config.gem “hpricot”, :version => ‘0.6’, :source =>
http://code.whytheluckystiff.net

dino d. wrote:

I didn’t originally, but now I did. I added:

require ‘blackbook’

and now, I get

no such file to load – blackbook

I’ve checked and blackbook.rb is installed here:

C:\ruby\lib\ruby\gems\1.8\gems\blackbook-1.0.4\lib

i don’t have any idea how ruby looks for gems or where. this error
tells me it can’t find blackbook.rb. Any ideas?

Thanks,
Dino

If so did you look at the comments pertaining to gems in
config/environment.rb?
Or optionally you may consider “vendoring” the gem.

See: Vendor Everything — err.the_blog

Robert W. wrote:

no, i’m running rails 2.0.2

thanks for your help so far.

On Sep 9, 5:28 pm, Robert W. [email protected]

SOLVED!

The problem was that since the installer failed, I had to install
without dependencies. Apparently, I forgot to manually install
fastercsv, but instead of throwing a message like ‘no fastercsv,’ it
said ‘no such file to load.’ Thanks for your help guys.

dino