# (new to rails) Error on flickr app

**URL:** <https://www.ruby-forum.com/t/new-to-rails-error-on-flickr-app/59783>\
**Category:** Ruby\
**Created:** [May 6, 2006, 4:06pm UTC](https://www.ruby-forum.com/t/new-to-rails-error-on-flickr-app/59783 "2006-05-06T16:06:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Gwynne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ce7236/32.png) [@Chris\_Gwynne](https://www.ruby-forum.com/u/Chris_Gwynne)\
**Post date:** [May 6, 2006, 4:06pm UTC](https://www.ruby-forum.com/t/new-to-rails-error-on-flickr-app/59783/1 "2006-05-06T16:06:36Z")

</div>

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](http://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?

---

<div class="post-metadata">

**Author:** ![Chris\_Gwynne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ce7236/32.png) [@Chris\_Gwynne](https://www.ruby-forum.com/u/Chris_Gwynne)\
**Post date:** [May 6, 2006, 7:22pm UTC](https://www.ruby-forum.com/t/new-to-rails-error-on-flickr-app/59783/2 "2006-05-06T19:22:59Z")

</div>

> `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

---

<div class="post-metadata">

**Author:** ![Chris\_Gwynne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ce7236/32.png) [@Chris\_Gwynne](https://www.ruby-forum.com/u/Chris_Gwynne)\
**Post date:** [May 7, 2006, 1:12am UTC](https://www.ruby-forum.com/t/new-to-rails-error-on-flickr-app/59783/3 "2006-05-07T01:12:30Z")

</div>

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.
