# Yet another engines not working with edge

**URL:** <https://www.ruby-forum.com/t/yet-another-engines-not-working-with-edge/55366>\
**Category:** Engines\
**Created:** [March 20, 2006, 2:41pm UTC](https://www.ruby-forum.com/t/yet-another-engines-not-working-with-edge/55366 "2006-03-20T14:41:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![surendra\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@surendra\_s](https://www.ruby-forum.com/u/surendra_s)\
**Post date:** [March 20, 2006, 2:41pm UTC](https://www.ruby-forum.com/t/yet-another-engines-not-working-with-edge/55366/1 "2006-03-20T14:41:56Z")

</div>

Hello,  
Recently something changed with edge, such that engines are no longer  
working with edge rails, in spite of the line

```
Engines.config :edge, true

```

in the environment.rb

Also, on cursory analysis this stack trace seems different from earlier  
stack  
traces.

Thanks.

c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1748:in  
`const_missing': s tack level too deep (SystemStackError) from ./script/../config/../vendor/plugins/engines/lib/engines/dependenci es_extensions.rb:10:in `require\_or\_load’  
from  
./script/…/config/…/vendor/rails/activesupport/lib/active\_support  
/dependencies.rb:30:in `depend_on' from ./script/../config/../vendor/rails/activesupport/lib/active_support /dependencies.rb:74:in `require\_dependency’  
from  
./script/…/config/…/vendor/rails/activesupport/lib/active\_support  
/dependencies.rb:104:in `rake_original_const_missing' from c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1761:in `cons  
t\_missing’  
from  
./script/…/config/…/vendor/plugins/engines/lib/engines/dependenci  
es\_extensions.rb:10:in `require_or_load' from ./script/../config/../vendor/rails/activesupport/lib/active_support /dependencies.rb:30:in `depend\_on’  
from  
./script/…/config/…/vendor/rails/activesupport/lib/active\_support  
/dependencies.rb:74:in `require_dependency' ... 621 levels... from ./script/../config/../vendor/rails/activesupport/lib/active_support /dependencies.rb:149:in `require’  
from  
./script/…/config/…/vendor/rails/railties/lib/commands/server.rb:  
34  
from  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in `re  
quire’  
from script/server:3

–  
Surendra S.  
[http://ssinghi.kreeti.com](http://ssinghi.kreeti.com), [http://www.kreeti.com](http://www.kreeti.com)  
Read my blog at: [http://cuttingtheredtape.blogspot.com/](http://cuttingtheredtape.blogspot.com/)  
,----  
| “All animals are equal, but some animals are more equal than others.”  
| – Orwell, Animal Farm, 1945  
`----

---

<div class="post-metadata">

**Author:** ![surendra\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@surendra\_s](https://www.ruby-forum.com/u/surendra_s)\
**Post date:** [March 21, 2006, 2:05am UTC](https://www.ruby-forum.com/t/yet-another-engines-not-working-with-edge/55366/2 "2006-03-21T02:05:20Z")

</div>

I’ve recently commited a new version of trunk that works with the  
current edge:

[http://dev.rails-engines.org/repository/changesets/305](http://dev.rails-engines.org/repository/changesets/305)

Please try that and let us know how you fare.

- james

On 3/20/06, Surendra S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ```
> from ./script/../config/../vendor/rails/activesupport/lib/active_support
> from ./script/../config/../vendor/rails/activesupport/lib/active_support
> 
> ```
> 
> Read my blog at: [http://cuttingtheredtape.blogspot.com/](http://cuttingtheredtape.blogspot.com/)

–

- J \*  
~

---

<div class="post-metadata">

**Author:** ![surendra\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@surendra\_s](https://www.ruby-forum.com/u/surendra_s)\
**Post date:** [March 21, 2006, 1:41pm UTC](https://www.ruby-forum.com/t/yet-another-engines-not-working-with-edge/55366/3 "2006-03-21T13:41:09Z")

</div>

Hello James,

“James A.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> I’ve recently commited a new version of trunk that works with the current edge:
> 
> [http://dev.rails-engines.org/repository/changesets/305](http://dev.rails-engines.org/repository/changesets/305)
> 
> Please try that and let us know how you fare.

I am on rails revision 4006 and engines revision 309.  
The backtrace is different this time:

./script/…/config/…/vendor/rails/activesupport/lib/active\_support/dependencies  
.rb:125:in `rake_original_const_missing': uninitialized constant LoadingModule (NameError) from c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1761:in `const\_missing’  
from  
./script/…/config/…/vendor/plugins/engines/lib/engines/dependencies\_extensions.rb:104  
from  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in  
`require' from ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:149:in `require’  
from  
./script/…/config/…/vendor/plugins/engines/lib/engines.rb:384  
from  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in  
`require' from ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:149:in `require’  
from ./script/…/config/…/vendor/plugins/engines/init.rb:32:in  
`load_plugin' ... 12 levels... from ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:149:in `require’  
from  
./script/…/config/…/vendor/rails/railties/lib/commands/server.rb:34  
from  
c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in  
`require’  
from script/server:3

## Thanks.

Surendra S.  
[http://ssinghi.kreeti.com](http://ssinghi.kreeti.com), [http://www.kreeti.com](http://www.kreeti.com)  
Read my blog at: [http://cuttingtheredtape.blogspot.com/](http://cuttingtheredtape.blogspot.com/)  
,----  
| “All animals are equal, but some animals are more equal than others.”  
| – Orwell, Animal Farm, 1945  
`----

---

<div class="post-metadata">

**Author:** ![surendra\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@surendra\_s](https://www.ruby-forum.com/u/surendra_s)\
**Post date:** [March 21, 2006, 5:12pm UTC](https://www.ruby-forum.com/t/yet-another-engines-not-working-with-edge/55366/4 "2006-03-21T17:12:52Z")

</div>

I was wrestling with this last night and I think I found a solution.  
Apparently one of the recent edge rail changes moves the Rails::VERSION  
constant somewhere else. There are a couple of checks that look like  
this in the code…

if Rails::VERSION::STRING = “1.0.0” && !Engine.config(:edge)

The problem is that the first part of that if statement doesn’t exist in  
edge anymore so it fails. If you swap the if statement so that it  
checks for :edge being set in the config first, then it never looks for  
Rails::VERSION in edge rails and everything works fine.

I’ll see if I can’t whip up a patch for it.

\_Kevin

---

<div class="post-metadata">

**Author:** ![surendra\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@surendra\_s](https://www.ruby-forum.com/u/surendra_s)\
**Post date:** [March 21, 2006, 5:15pm UTC](https://www.ruby-forum.com/t/yet-another-engines-not-working-with-edge/55366/5 "2006-03-21T17:15:17Z")

</div>

I think I might’ve made a patch that resolves that last night - see  
[http://dev.rails-engines.org/repository/changesets/305](http://dev.rails-engines.org/repository/changesets/305) - however,  
checking for :edge first might also been a good idea.

- james

On 21 Mar 2006 16:12:35 -0000, Kevin O.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Rails::VERSION in edge rails and everything works fine.
> 
> > > “James A.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:  
> > > ./script/…/config/…/vendor/rails/activesupport/lib/  
> > > active\_support/dependencies.rb:149:in `require' active_support/dependencies.rb:149:in `require’  
> > > [http://ssinghi.kreeti.com](http://ssinghi.kreeti.com), [http://www.kreeti.com](http://www.kreeti.com)  
> > > no longer
> > > 
> > > > > Thanks.  
> > > > > from ./script/…/config/…/vendor/rails/activesupport/  
> > > > > es\_extensions.rb:10:in `require\_or\_load’  
> > > > > from ./script/…/config/…/vendor/rails/railties/lib/  
> > > > > Read my blog at: [http://cuttingtheredtape.blogspot.com/](http://cuttingtheredtape.blogspot.com/)  
> > > > > [http://lists.rails-engines.org/listinfo.cgi/](http://lists.rails-engines.org/listinfo.cgi/)  
> > > > > removed\_email\_address@domain.invalid  
> > > > > removed\_email\_address@domain.invalid  
> > > > > 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:** ![surendra\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@surendra\_s](https://www.ruby-forum.com/u/surendra_s)\
**Post date:** [March 21, 2006, 2:03pm UTC](https://www.ruby-forum.com/t/yet-another-engines-not-working-with-edge/55366/6 "2006-03-21T14:03:46Z")

</div>

Can you add this line to the top of your environment.rb file (at some  
point BEFORE the initializer):

module Engines; CONFIG={:edge =\> true}; end

The method for ‘activating’ edge engines behaviour changed a while  
back, this should be reflected in the README.

- james

On 3/21/06, Surendra S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> The backtrace is different this time:  
> from ./script/…/config/…/vendor/plugins/engines/init.rb:32:in `load\_plugin’  
> [http://ssinghi.kreeti.com](http://ssinghi.kreeti.com), [http://www.kreeti.com](http://www.kreeti.com)
> 
> > > working with edge rails, in spite of the line  
> > > c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1748:in `const\_missing’: s  
> > > t\_missing’  
> > > 34  
> > > | – Orwell, Animal Farm, 1945
> > 
> > - J \*  
> > ~
> 
> * * *
> 
> engine-users mailing list  
> 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:** ![surendra\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@surendra\_s](https://www.ruby-forum.com/u/surendra_s)\
**Post date:** [March 21, 2006, 5:25pm UTC](https://www.ruby-forum.com/t/yet-another-engines-not-working-with-edge/55366/7 "2006-03-21T17:25:13Z")

</div>

Perhaps I missed it, but I was working on this pretty late last night.  
In anycase, I submitted a ticket and patch for it.

\_Kevin

---

<div class="post-metadata">

**Author:** ![surendra\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@surendra\_s](https://www.ruby-forum.com/u/surendra_s)\
**Post date:** [March 21, 2006, 5:41pm UTC](https://www.ruby-forum.com/t/yet-another-engines-not-working-with-edge/55366/8 "2006-03-21T17:41:08Z")

</div>

“James A.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> Can you add this line to the top of your environment.rb file (at some  
> point BEFORE the initializer):
> 
> module Engines; CONFIG={:edge =\> true}; end

Yes, indeed this works.

Thanks.

> The method for ‘activating’ edge engines behaviour changed a while  
> back, this should be reflected in the README.

–  
Surendra S.  
[http://ssinghi.kreeti.com](http://ssinghi.kreeti.com), [http://www.kreeti.com](http://www.kreeti.com)  
Read my blog at: [http://cuttingtheredtape.blogspot.com/](http://cuttingtheredtape.blogspot.com/)  
,----  
| Great wits are sure to madness near allied,  
| And thin partitions do their bounds divide.  
|  
| (John Dryden, Absalom and Achitophel, 1681)  
`----
