Engines 1.1.1 and freeze gems with rails 1.1.2 problems

Hi,

I’ve installed engines from 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

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. [email protected] 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
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

  • J *
    ~

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. [email protected] 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
[email protected]
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

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. [email protected] wrote:

the gem.

  • james

[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

  • J *
    ~

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. [email protected] 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
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

  • J *
    ~

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. [email protected] wrote:

the gem.

  • james

[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

  • J *
    ~

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. [email protected] wrote:

the gem.

  • james

[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

  • J *
    ~

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