(new to rails) Error on flickr app

Hi

I’m new to rails and am just trying out some tutorials before I delve
into it properly.

I’m trying to create the flickr app (found in the screencasts section on
rubyonrails.com)

I’ve built everything according to the video and all the code is correct
however I’m getting the following error.

NameError in FlickrController#search

uninitialized constant Flickr

RAILS_ROOT: ./script/…/config/…
Application Trace | Framework Trace | Full Trace

d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
const_missing' d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in const_missing’
d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in
send' d:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in const_missing’
#{RAILS_ROOT}/app/controllers/flickr_controller.rb:3:in `search’

This error occured while loading the following files:
flickr.rb

No idea what’s causing it. Any help?

`const_missing’
No idea what’s causing it. Any help?

For whatever reason it can’t find the Flickr api. Did you do the ‘sudo
gem install -r flickr’ step, and then add require “flickr” into your
environment.rb file? It’s complaining about an uninitialized constant
because in your controller, on the line ‘flickr = Flickr.new “…”’, the
interpreter doesn’t know about the Flickr class, and since it begins
with an uppercase character it thinks it should be a constant.

HTH,
Dave

Dave Lains wrote:

For whatever reason it can’t find the Flickr api. Did you do the ‘sudo
gem install -r flickr’ step, and then add require “flickr” into your
environment.rb file? It’s complaining about an uninitialized constant
because in your controller, on the line ‘flickr = Flickr.new “…”’, the
interpreter doesn’t know about the Flickr class, and since it begins
with an uppercase character it thinks it should be a constant.

Did a quick check and naming conventions seem to be right, double
checked the code and everything and it still doesn’t work.