Forum: Rails Engines Engines 1.1.1 and freeze gems with rails 1.1.2 problems

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
291ce712bdd6aa97abad3b693ca045d1?d=identicon&s=25 Justin Chen (Guest)
on 2006-04-22 00:40
(Received via mailing list)
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
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-04-22 16:11
(Received via mailing list)
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 Chen <justin.h.chen@gmail.com> 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
> engine-users@lists.rails-engines.org
> http://lists.rails-engines.org/listinfo.cgi/engine...
>
>
>


--
* J *
  ~
12d7355717970c4293fb2c943a5ed804?d=identicon&s=25 Pedro Visintin (Guest)
on 2006-05-07 17:49
James Adam 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 Chen <justin.h.chen@gmail.com> 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
>> engine-users@lists.rails-engines.org
>> http://lists.rails-engines.org/listinfo.cgi/engine...
>>
>>
>>
>
>
> --
> * 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 Visintin
http://blogs.onrails.com.ar
F2d1d63f8cdec9441677eb728d7437bb?d=identicon&s=25 Chris Hapgood (Guest)
on 2006-05-10 15:35
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

 2. 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 Adam 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 Chen <justin.h.chen@gmail.com> 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
>> engine-users@lists.rails-engines.org
>> http://lists.rails-engines.org/listinfo.cgi/engine...
>>
>>
>>
>
>
> --
> * J *
>   ~
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-05-10 16:00
(Received via mailing list)
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 Hapgood <cch2@removethishapgoods.com> wrote:
>
> the gem.
> > - james
> >>
> engine-users@lists.rails-engines.org
> http://lists.rails-engines.org/listinfo.cgi/engine...
>


--
* J *
  ~
Db2175eb86669d396b8596d11478f5ef?d=identicon&s=25 Cayce Balara (yardboy)
on 2006-05-24 16:10
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 Adam 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 Hapgood <cch2@removethishapgoods.com> wrote:
>>
>> the gem.
>> > - james
>> >>
>> engine-users@lists.rails-engines.org
>> http://lists.rails-engines.org/listinfo.cgi/engine...
>>
>
>
> --
> * J *
>   ~
7d21745717af72770a5fb9aba26a4b4b?d=identicon&s=25 Brad (Guest)
on 2006-07-21 21:35
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 Balara 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 Adam 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 Hapgood <cch2@removethishapgoods.com> wrote:
>>>
>>> the gem.
>>> > - james
>>> >>
>>> engine-users@lists.rails-engines.org
>>> http://lists.rails-engines.org/listinfo.cgi/engine...
>>>
>>
>>
>> --
>> * J *
>>   ~
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-07-21 23:35
(Received via mailing list)
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
This topic is locked and can not be replied to.