Forum: Rails Engines Yet another engines not working with edge

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.
D449d54c3b0f8c9930c11c7d7d3e6cdd?d=identicon&s=25 Surendra Singhi (Guest)
on 2006-03-20 14:41
(Received via mailing list)
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 Singhi
http://ssinghi.kreeti.com, http://www.kreeti.com
Read my blog at: http://cuttingtheredtape.blogspot.com/
,----
| "All animals are equal, but some animals are more equal than others."
|     -- Orwell, Animal Farm, 1945
`----
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-03-21 02:05
(Received via mailing list)
I've recently commited a new version of trunk that works with the
current edge:

  http://dev.rails-engines.org/repository/changesets/305

Please try that and let us know how you fare.

- james

On 3/20/06, Surendra Singhi <efuzzyone@netscape.net> 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/
>
--
* J *
  ~
D449d54c3b0f8c9930c11c7d7d3e6cdd?d=identicon&s=25 Surendra Singhi (Guest)
on 2006-03-21 13:41
(Received via mailing list)
Hello James,

"James Adam" <james.adam@gmail.com> writes:
> I've recently commited a new version of trunk that works with the current edge:
>
>   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 Singhi
http://ssinghi.kreeti.com, http://www.kreeti.com
Read my blog at: http://cuttingtheredtape.blogspot.com/
,----
| "All animals are equal, but some animals are more equal than others."
|     -- Orwell, Animal Farm, 1945
`----
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-03-21 14:03
(Received via mailing list)
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 Singhi <efuzzyone@netscape.net> wrote:
> The backtrace is different this time:
>         from ./script/../config/../vendor/plugins/engines/init.rb:32:in `load_plugin'
> http://ssinghi.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
> engine-users@lists.rails-engines.org
> http://lists.rails-engines.org/listinfo.cgi/engine...
>


--
* J *
  ~
7be98b1602d3a3842e8f8602118bc9cd?d=identicon&s=25 Kevin Olbrich (Guest)
on 2006-03-21 17:12
(Received via mailing list)
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
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-03-21 17:15
(Received via mailing list)
I think I might've made a patch that resolves that last night - see
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 Olbrich
<devlists-rails-engine-users@devlists.com> wrote:
> Rails::VERSION in edge rails and everything works fine.
> >
> >> "James Adam" <james.adam@gmail.com> 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://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://lists.rails-engines.org/listinfo.cgi/
> >> engine-users@lists.rails-engines.org
> >engine-users@lists.rails-engines.org
> engine-users@lists.rails-engines.org
> http://lists.rails-engines.org/listinfo.cgi/engine...
>


--
* J *
  ~
7be98b1602d3a3842e8f8602118bc9cd?d=identicon&s=25 Kevin Olbrich (Guest)
on 2006-03-21 17:25
(Received via mailing list)
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
D449d54c3b0f8c9930c11c7d7d3e6cdd?d=identicon&s=25 Surendra Singhi (Guest)
on 2006-03-21 17:41
(Received via mailing list)
"James Adam" <james.adam@gmail.com> 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 Singhi
http://ssinghi.kreeti.com, http://www.kreeti.com
Read my blog at: 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)
`----
This topic is locked and can not be replied to.