On 23 May 2006, at 22:14, Ingo W. wrote:
flickr = Flickr.new
I get the following error:
./flickr.rb:15: uninitialized constant Flickr (NameError)
The line number indicates that the require ‘flickr’ line has worked
fine, so the file has been loaded okay by the looks of things.
I’ve not used the flickr api, but it looks like it doesn’t have a
class called Flickr in it. Have you had a scan of the documentation
to get a feeling for it?
if I run ‘type flickr’ in the terminal I get:
-bash: type: flickr: not found
I guess that’s because flickr isn’t a command in bash’s path. It’s a
gem for Ruby, not something for the shell (although some Gems (rake,
for example) do instal utility commands).
Where are gems typically installed?
Ah, you can find that out with:
gem env gemp
and my favourite:
cd `gem env gemp`
You may want to find out a bit more about the gem command with:
BTW I tried to run “require ‘flickr’” in an IRB session but got an
error. How can I require files in an IRB session?
That’s the correct way. As someone else posted, you may have to
require ruby gems first. I do that as a default by having this in
Thanks for any help!
Hope it helps,