# Engines 1.1.1 and freeze gems with rails 1.1.2 problems

**URL:** <https://www.ruby-forum.com/t/engines-1-1-1-and-freeze-gems-with-rails-1-1-2-problems/58480>\
**Category:** Engines\
**Created:** [April 22, 2006, 12:40am UTC](https://www.ruby-forum.com/t/engines-1-1-1-and-freeze-gems-with-rails-1-1-2-problems/58480 "2006-04-22T00:40:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![justincollins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@justincollins](https://www.ruby-forum.com/u/justincollins)\
**Post date:** [April 22, 2006, 12:40am UTC](https://www.ruby-forum.com/t/engines-1-1-1-and-freeze-gems-with-rails-1-1-2-problems/58480/1 "2006-04-22T00:40:55Z")

</div>

Hi,

I’ve installed engines from [http://svn.rails-engines.org/plugins/engines](http://svn.rails-engines.org/plugins/engines)  
and  
I’m currently running rails 1.1.2 (ruby 1.8.4 , mac os 10.4.6). It all  
seems to work fine like this, but when I try to do a “rake  
rails:freeze:gems” (so that I can use it on my shared host which only  
has  
1.0) and try to run from “vendor/rails” I get problems. I can start up  
webrick with script/server but when I try to hit a page I get the  
following  
error:

#\<NoMethodError: undefined method `clear!' for Controllers:Module> ["/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:53:in `reset\_application!‘", "/usr/local/lib/ruby/gems/1.8/gems/rails-  
1.0.0/lib/dispatcher.rb:75:in  
`reset_after_dispatch'", "/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:46:in `dispatch’",  
“/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick\_server.rb:117:in  
`handle_dispatch'", "/usr/local/lib/ruby/gems/1.8/gems/rails- 1.0.0/lib/webrick_server.rb:83:in `service’”, “/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in  
`service'", "/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run’”,  
“/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'", "/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start\_thread’”,  
“/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'", "/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start’”,  
“/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'", "/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start’”,  
“/usr/local/lib/ruby/gems/1.8/gems/rails-  
1.0.0/lib/webrick\_server.rb:69:in  
`dispatch'", "./script/../config/../vendor/rails/railties/lib/commands/servers/webrick.rb:59", "/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require’”,  
"./script/…/config/…/vendor/rails/activesupport/lib/active\_support/dependencies.rb:147:in  
`require'", "./script/../config/../vendor/rails/railties/lib/commands/server.rb:30", "script/server:3"] [2006-04-21 17:22:47] ERROR `/’ not found.

If i remove the “engines” plugin, the server seems to work fine again so  
I’m  
pretty sure it’s something with “engines”. I also tried the “edge=\>  
true”  
config that’s documented on the website, but that doesnt help either.

Any thoughts?

Thanks,  
Justin

---

<div class="post-metadata">

**Author:** ![justincollins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@justincollins](https://www.ruby-forum.com/u/justincollins)\
**Post date:** [April 22, 2006, 4:11pm UTC](https://www.ruby-forum.com/t/engines-1-1-1-and-freeze-gems-with-rails-1-1-2-problems/58480/2 "2006-04-22T16:11:32Z")

</div>

If you look at the paths of the files in the error you’re getting, it  
looks like Rails 1.0 is still being loaded. Did you freeze the gems  
from your own machine? It might be worth double-checking which version  
of Rails you have frozen into your /vendor/rails directory…

- james

On 4/21/06, Justin C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> #\<NoMethodError: undefined method `clear!’ for Controllers:Module\>  
> "/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in  
> "/usr/local/lib/ruby/gems/1.8/gems/rails-  
> If i remove the “engines” plugin, the server seems to work fine again so I’m  
> removed\_email\_address@domain.invalid  
> [http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org](http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org)

–

- J \*  
~

---

<div class="post-metadata">

**Author:** ![justincollins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@justincollins](https://www.ruby-forum.com/u/justincollins)\
**Post date:** [May 7, 2006, 5:49pm UTC](https://www.ruby-forum.com/t/engines-1-1-1-and-freeze-gems-with-rails-1-1-2-problems/58480/3 "2006-05-07T17:49:06Z")

</div>

James A. wrote:

> If you look at the paths of the files in the error you’re getting, it  
> looks like Rails 1.0 is still being loaded. Did you freeze the gems  
> from your own machine? It might be worth double-checking which version  
> of Rails you have frozen into your /vendor/rails directory…
> 
> - james
> 
> On 4/21/06, Justin C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > #\<NoMethodError: undefined method `clear!’ for Controllers:Module\>  
> > "/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in  
> > "/usr/local/lib/ruby/gems/1.8/gems/rails-  
> > If i remove the “engines” plugin, the server seems to work fine again so I’m  
> > removed\_email\_address@domain.invalid  
> > [http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org](http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org)
> 
> –
> 
> - J \*  
> ~

I have similar problem Im dealing with load path problems after install  
plugin engines.

My apps works fine in my Windows, but fails in Shared Hosting, but only  
if has engines plugins installed.  
The engines plugins changes the reference path to load rails from  
freezed rails (or my custom gem dir) to shared hosting rails 1.0 path.  
Without engines plugins, the app runs fine.

Context:  
Deploy from Windows → Shared hosting

rake freeze\_gems

rake deploy

runs ok

On linux box

plugin install engines

Fails I got:

NoMethodError

undefined method `const\_load!’ for Controllers:Module

RAILS\_ROOT: …/config/…  
Application Trace | Framework Trace | Full Trace

/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:71:in  
`prepare_application' /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:37:in `dispatch’  
dispatch.cgi:10

/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:71:in  
`prepare_application' /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:37:in `dispatch’  
dispatch.cgi:10

Pedro V.  
[http://blogs.onrails.com.ar](http://blogs.onrails.com.ar)

---

<div class="post-metadata">

**Author:** ![justincollins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@justincollins](https://www.ruby-forum.com/u/justincollins)\
**Post date:** [May 10, 2006, 4:00pm UTC](https://www.ruby-forum.com/t/engines-1-1-1-and-freeze-gems-with-rails-1-1-2-problems/58480/4 "2006-05-10T16:00:41Z")

</div>

Turns out this is an issue in the Engines plugin, and it has been  
fixed in the release branch - I’ll push 1.1.3 out as soon as I get the  
chance (my powerbook died a few days ago, replacement arriving  
tomorrow hopefully). A quick-fix has been posted on the mailing list.

- james

On 5/10/06, Chris H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> the gem.
> 
> > - james
> > 
> > >
> 
> removed\_email\_address@domain.invalid  
> [http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org](http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org)

–

- J \*  
~

---

<div class="post-metadata">

**Author:** ![justincollins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@justincollins](https://www.ruby-forum.com/u/justincollins)\
**Post date:** [May 10, 2006, 3:35pm UTC](https://www.ruby-forum.com/t/engines-1-1-1-and-freeze-gems-with-rails-1-1-2-problems/58480/5 "2006-05-10T15:35:35Z")

</div>

I’m having exactly the same problem as Justin on Windows. If I freeze  
rails to the edge (rake rails:freeze:edge) then try to access any page,  
I get the same error. Like Justin, I see a reference to the rails gem  
v1.0, even though I clearly see version 4333 in the rails plugin  
directory. Simply unfreezing rails (rake rails:unfreeze) solves the  
problem.

------- Potentially related question ------------

I am unclear on the difference between

1. rake rails:freeze:edge

and

1. svn ps svn:externals “rails http://…rails/trunk/” vendor  
svn update

I have usually used the first, but the second looks to be the better way  
(as I am already using subversion and externals). But the second way  
does not seem to do the same thing -rails still seems to run v1.0 from  
the gem.

Regards,  
Chris

James A. wrote:

> If you look at the paths of the files in the error you’re getting, it  
> looks like Rails 1.0 is still being loaded. Did you freeze the gems  
> from your own machine? It might be worth double-checking which version  
> of Rails you have frozen into your /vendor/rails directory…
> 
> - james
> 
> On 4/21/06, Justin C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > #\<NoMethodError: undefined method `clear!’ for Controllers:Module\>  
> > "/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in  
> > "/usr/local/lib/ruby/gems/1.8/gems/rails-  
> > If i remove the “engines” plugin, the server seems to work fine again so I’m  
> > removed\_email\_address@domain.invalid  
> > [http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org](http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org)
> 
> –
> 
> - J \*  
> ~

---

<div class="post-metadata">

**Author:** ![justincollins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@justincollins](https://www.ruby-forum.com/u/justincollins)\
**Post date:** [May 24, 2006, 4:10pm UTC](https://www.ruby-forum.com/t/engines-1-1-1-and-freeze-gems-with-rails-1-1-2-problems/58480/6 "2006-05-24T16:10:29Z")

</div>

Hi James:

Can you elaborate on the ‘quick-fix’ or point me to a link - I tried to  
search through archives on mailing list below and could not find that  
post.

thanks.  
c.

James A. wrote:

> Turns out this is an issue in the Engines plugin, and it has been  
> fixed in the release branch - I’ll push 1.1.3 out as soon as I get the  
> chance (my powerbook died a few days ago, replacement arriving  
> tomorrow hopefully). A quick-fix has been posted on the mailing list.
> 
> - james
> 
> On 5/10/06, Chris H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > the gem.
> > 
> > > - james
> > > 
> > > >
> > 
> > removed\_email\_address@domain.invalid  
> > [http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org](http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org)
> 
> –
> 
> - J \*  
> ~

---

<div class="post-metadata">

**Author:** ![justincollins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@justincollins](https://www.ruby-forum.com/u/justincollins)\
**Post date:** [July 21, 2006, 9:35pm UTC](https://www.ruby-forum.com/t/engines-1-1-1-and-freeze-gems-with-rails-1-1-2-problems/58480/7 "2006-07-21T21:35:38Z")

</div>

I am getting the most frustrating error

#\<NoMethodError: undefined method `clear!' for Controllers:Module> ["/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:53:in `reset\_application!‘",  
"/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:75:in  
`reset_after_dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:46:in `dispatch’",  
“/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick\_server.rb:117:in  
`handle_dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:83:in `service’”, “/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'", "/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run’”,  
“/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'", "/usr/lib/ruby/1.8/webrick/server.rb:162:in `start\_thread’”,  
“/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:92:in `start’”,  
“/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:82:in `start’”,  
“/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick\_server.rb:69:in  
`dispatch'", "./script/../config/../vendor/rails/railties/lib/commands/servers/webrick.rb:59", "/usr/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’”,  
“./script/…/config/…/vendor/rails/activesupport/lib/active\_support/dependencies.rb:147:in  
`require’”,  
“./script/…/config/…/vendor/rails/railties/lib/commands/server.rb:39”,  
“script/server:3”]

Cayce B. wrote:

> Hi James:
> 
> Can you elaborate on the ‘quick-fix’ or point me to a link - I tried to  
> search through archives on mailing list below and could not find that  
> post.
> 
> thanks.  
> c.
> 
> James A. wrote:
> 
> > Turns out this is an issue in the Engines plugin, and it has been  
> > fixed in the release branch - I’ll push 1.1.3 out as soon as I get the  
> > chance (my powerbook died a few days ago, replacement arriving  
> > tomorrow hopefully). A quick-fix has been posted on the mailing list.
> > 
> > - james
> > 
> > On 5/10/06, Chris H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > 
> > > the gem.
> > > 
> > > > - james
> > > > 
> > > > >
> > > 
> > > removed\_email\_address@domain.invalid  
> > > [http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org](http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org)
> > 
> > –
> > 
> > - J \*  
> > ~

---

<div class="post-metadata">

**Author:** ![justincollins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@justincollins](https://www.ruby-forum.com/u/justincollins)\
**Post date:** [July 21, 2006, 11:35pm UTC](https://www.ruby-forum.com/t/engines-1-1-1-and-freeze-gems-with-rails-1-1-2-problems/58480/8 "2006-07-21T23:35:47Z")

</div>

This error seems to stem from the gem version of Rails being loaded.  
This was fixed in an earlier version of the Engines plugin - are you  
running the latest version (1.1.3)?

- james
