# Expected XYZcontroller.rb to define XYZ

**URL:** <https://www.ruby-forum.com/t/expected-xyzcontroller-rb-to-define-xyz/137307>\
**Category:** Ruby\
**Created:** [May 11, 2008, 8:47pm UTC](https://www.ruby-forum.com/t/expected-xyzcontroller-rb-to-define-xyz/137307 "2008-05-11T20:47:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajatgarg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a183cd/32.png) [@rajatgarg](https://www.ruby-forum.com/u/rajatgarg)\
**Post date:** [May 11, 2008, 8:47pm UTC](https://www.ruby-forum.com/t/expected-xyzcontroller-rb-to-define-xyz/137307/1 "2008-05-11T20:47:53Z")

</div>

Hi Guys,

I have a page - [http://www.pilotoutlook.com/flying\_club/dosearch](http://www.pilotoutlook.com/flying_club/dosearch)

which was working fine and then I changed the code and I started having  
some  
issues. So, I reverted it back but I am still having following errors -

Processing ApplicationController#dosearch (for 24.16.111.232 at  
2008-05-11  
01:23:12) [GET]  
Session ID: 879c894e2c7e646b380cd53b259833db  
Parameters: {“action”=\>“dosearch”, “controller”=\>“flying\_club”}

LoadError (Expected /usr/rails/app/controllers/flying\_club\_controller.rb  
to  
define FlyingClubController):

/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active\_support/dependencies.rb:249:in  
`load\_missing\_constant’

/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active\_support/dependencies.rb:452:in  
`const\_missing’

/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active\_support/dependencies.rb:464:in  
`const\_missing’

/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active\_support/inflector.rb:250:in  
`constantize’

I have a flying\_club\_controller.rb which has following code -

class FlyingClubController \< ApplicationController  
def dosearch  
…  
end

…  
end

FlyingClubController is defined, so why is it complaining. Please  
advise.

–  
Rajat G.

Ph: 206-499-9495  
Add: 16140 SE EastGate Way APT E-204  
Bellevue, WA 98008  
Web: [http://www.pilotoutlook.com](http://www.pilotoutlook.com)

---

<div class="post-metadata">

**Author:** ![rajatgarg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a183cd/32.png) [@rajatgarg](https://www.ruby-forum.com/u/rajatgarg)\
**Post date:** [May 11, 2008, 8:55pm UTC](https://www.ruby-forum.com/t/expected-xyzcontroller-rb-to-define-xyz/137307/2 "2008-05-11T20:55:38Z")

</div>

On Mon, May 12, 2008 at 03:45:30AM +0900, Rajat G. wrote:

> LoadError (Expected /usr/rails/app/controllers/flying\_club\_controller.rb to  
> define FlyingClubController):

One scenario: flying\_club\_controller.rb require’s some file (perhaps in  
a  
helper) which has a problem. Look there.

Btw, this is the Ruby language list; please ask Rails-related questions  
on the  
Rails mailing lists/fora.
