# Upgrade problem to Rails 1.2.2 with RADRails

**URL:** <https://www.ruby-forum.com/t/upgrade-problem-to-rails-1-2-2-with-radrails/86220>\
**Category:** Rails\
**Created:** [February 20, 2007, 7:56pm UTC](https://www.ruby-forum.com/t/upgrade-problem-to-rails-1-2-2-with-radrails/86220 "2007-02-20T19:56:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kerbo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/34f0e0/32.png) [@kerbo](https://www.ruby-forum.com/u/kerbo)\
**Post date:** [February 20, 2007, 7:56pm UTC](https://www.ruby-forum.com/t/upgrade-problem-to-rails-1-2-2-with-radrails/86220/1 "2007-02-20T19:56:39Z")

</div>

I upgraded to Rails 1.2.2 and my project inside of RADRails stopped  
working. I think I followed the steps in the upgrade process  
correclty. The problem occurs when accessing the first page. I get the  
error:

Expected ./script/…/config/…/app/controllers/main\_controller.rb to  
define MainController

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active\_support/  
dependencies.rb:249:in `load_missing_constant' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/ dependencies.rb:452:in`const\_missing’  
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active\_support/  
dependencies.rb:464:in `const\_missing’  
etc

Any ideas?

---

<div class="post-metadata">

**Author:** ![kerbo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/34f0e0/32.png) [@kerbo](https://www.ruby-forum.com/u/kerbo)\
**Post date:** [February 20, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/upgrade-problem-to-rails-1-2-2-with-radrails/86220/2 "2007-02-20T21:20:58Z")

</div>

Are you using engines? If so the engine code is not ready for 1.2.2.

Aaron

---

<div class="post-metadata">

**Author:** ![kerbo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/34f0e0/32.png) [@kerbo](https://www.ruby-forum.com/u/kerbo)\
**Post date:** [February 20, 2007, 9:22pm UTC](https://www.ruby-forum.com/t/upgrade-problem-to-rails-1-2-2-with-radrails/86220/3 "2007-02-20T21:22:59Z")

</div>

That looks very much like a problem we were having. In our case, as of  
Rails 1.2, any modules loaded from the /lib directory needed to be  
explicitly required in the class file doing the calling. However, I  
haven’t seen that with a controller before. The “expected \_\_\_\_ to  
define \_\_\_\_” part of your error though is exactly the same thing we were  
seeing and a properly placed ‘require’ corrected it for us.

---

<div class="post-metadata">

**Author:** ![kerbo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/34f0e0/32.png) [@kerbo](https://www.ruby-forum.com/u/kerbo)\
**Post date:** [February 21, 2007, 6:28am UTC](https://www.ruby-forum.com/t/upgrade-problem-to-rails-1-2-2-with-radrails/86220/4 "2007-02-21T06:28:50Z")

</div>

Well, when I’ve seen that “Expected blah to define Blah” error before,  
it’s always been because I was really not defining that class in that  
file. Does main\_controller.rb exist where it thinks it should; does that  
file define MainController?

b
