[Rails] Re: Strange dependency error after going Ruby1.8.6, Rails 2.1.0 -> Ruby1.8.7, Rails 2.1.2

2008-11-09 Thread Java

Ah, sorry, that was a little quick.
Actually the bug is caused by the resource_controller plugin.
My bad.
I posted a report in the resource_controller group.

regards

Jan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Strange dependency error after going Ruby1.8.6, Rails 2.1.0 -> Ruby1.8.7, Rails 2.1.2

2008-11-09 Thread Java

Well, the andand gem seems to be the culprit (http://github.com/
raganwald/andand/tree/master/lib/andand.rb).

I'll contact the author about this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Strange dependency error after going Ruby1.8.6, Rails 2.1.0 -> Ruby1.8.7, Rails 2.1.2

2008-11-07 Thread Frederick Cheung



On Nov 7, 6:22 pm, Java <[EMAIL PROTECTED]> wrote:
> Ah, yes, thanks.
>
> I'll try to investigate this a bit further.
> The case you linked to describes a different problem though, it seems.
> In my case the model (Price) and the ApplicationHelper are fairly
> vanilla,
> not loading any fancy external libraries through ways untrackable by
> Rails dependency mechanisms.

You can also confuse the dependency system by using require when you
could/should be using require_dependency.

> That's what's bothering me so much (after all, I got my code running
> by pulling the Price reference out of the helper),
> all this seems to indicate a bug somewhere in the dependency/
> autoreload mechanism.

Hard to say from what I've seen.

Fred
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Strange dependency error after going Ruby1.8.6, Rails 2.1.0 -> Ruby1.8.7, Rails 2.1.2

2008-11-07 Thread Java

Ah, yes, thanks.

I'll try to investigate this a bit further.
The case you linked to describes a different problem though, it seems.
In my case the model (Price) and the ApplicationHelper are fairly
vanilla,
not loading any fancy external libraries through ways untrackable by
Rails dependency mechanisms.
That's what's bothering me so much (after all, I got my code running
by pulling the Price reference out of the helper),
all this seems to indicate a bug somewhere in the dependency/
autoreload mechanism.

Jan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Strange dependency error after going Ruby1.8.6, Rails 2.1.0 -> Ruby1.8.7, Rails 2.1.2

2008-11-02 Thread Frederick Cheung



On Nov 2, 10:40 pm, Java <[EMAIL PROTECTED]> wrote:
> Ok, I tried Rails 2.1.2, 2.1.1 and 2.1.0
> The error shows up in all versions.
> I guess that means it has something to do with the Ruby Update (1.8.6 -
>
> > 1.8.7)?

Typically this happens when you're mixing things that are reloading
between requests and things that aren;t (in production nothing is
reloaded so this problem can't happen).
See 
http://groups.google.com/group/rubyonrails-core/browse_thread/thread/710868b1292c737f

Fred
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Strange dependency error after going Ruby1.8.6, Rails 2.1.0 -> Ruby1.8.7, Rails 2.1.2

2008-11-02 Thread Java

Ok, I tried Rails 2.1.2, 2.1.1 and 2.1.0
The error shows up in all versions.
I guess that means it has something to do with the Ruby Update (1.8.6 -
> 1.8.7)?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Strange dependency error after going Ruby1.8.6, Rails 2.1.0 -> Ruby1.8.7, Rails 2.1.2

2008-11-01 Thread Mark Reginald James

Java wrote:
> Yeah, I can confirm that.
> I moved the
> 
>   Price.find_all_by_sessiontype(sessiontype)
> 
> out of the helper method and now everything seems to work.
> 
> I still think this error shouldn't have happened in the first place.
> I tried to investigate, but the dependency loader is so
> full of Voodoo that I can't figure it out.

Yes, it shouldn't have happened. To pinpoint the blame,
can you try downgrading one of Rails or Ruby? It'd be
easiest to set RAILS_GEM_VERSION = '2.1.0' in environment.rb.

-- 
Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Strange dependency error after going Ruby1.8.6, Rails 2.1.0 -> Ruby1.8.7, Rails 2.1.2

2008-11-01 Thread Java

Yeah, I can confirm that.
I moved the

  Price.find_all_by_sessiontype(sessiontype)

out of the helper method and now everything seems to work.

I still think this error shouldn't have happened in the first place.
I tried to investigate, but the dependency loader is so
full of Voodoo that I can't figure it out.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Strange dependency error after going Ruby1.8.6, Rails 2.1.0 -> Ruby1.8.7, Rails 2.1.2

2008-11-01 Thread Java

Oh, damn, sorry, of course. I forgot, here it is:

19  def price_options_for(sessiontype)
20options_for_select
(Price.find_all_by_sessiontype(sessiontype).map { |p|
21  ["#{p.format} #{german_price(p.price, true)}", p.format]
22})
23  end

Other Methods in the helper never throw an exception..
After posting my original message I poked around the code a little bit
further.
I think accessing the "Price" model might cause the error.
But, uh, that's not something that should happen, right?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Strange dependency error after going Ruby1.8.6, Rails 2.1.0 -> Ruby1.8.7, Rails 2.1.2

2008-10-31 Thread Mark Reginald James

Java wrote:
> Hi,
> 
> I'm getting an error I just can't find any cause for.
> The error is "A copy of ApplicationHelper has been removed from the
> module tree but is still active!" and gets thrown
> in a Template that uses a method defined in my ApplicationHelper. The
> error occurs only in development mode.
> 
> The error did not occur before my switch to Ruby 1.8.7 and Rails 2.1.2
> minutes ago.
> I have absolutely no clue about what could be causing this.
> The problem occurs on windows as well as MacOS X 10.5
> 
> Any help would be appreciated.
> 
> regards
> 
> Jan
> 
> Stacktrace:
> 
> ActionView::TemplateError (A copy of ApplicationHelper has been
> removed from the module tree but is still active!) on line #57 of
> photosessions/show.html.erb:
> 54: 
> 55: 
> 56: 
> 57: <%=
> price_options_for(@photosession.typ) %>
> 58: 
> 59: 
> 60: 
> 
> /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/
> active_support/dependencies.rb:250:in `load_missing_constant'
> /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/
> active_support/dependencies.rb:468:in `const_missing'
> app/helpers/application_helper.rb:20:in `price_options_for'

Could you please post line 20 of application_helper.rb


-- 
Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---