Frioffol Friofool
2007-Apr-18 16:34 UTC
'' X is not missing constant Y '' , problem after rails update
Hello, I''m just updating my rails version to 1.2.3 I get the '' X is not missing constant Y'' message for all request in my existing applications. Exemple : app/controller/login/login.rb use a model in : app/models/login/connect.rb This exemple give the error : " Login is not missing constant Connect! " What''s wrong im my configuration ? -- Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
hemant
2007-Apr-18 16:41 UTC
Re: '' X is not missing constant Y '' , problem after rails update
On 4/18/07, Frioffol Friofool <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hello, > > I''m just updating my rails version to 1.2.3 > I get the '' X is not missing constant Y'' message for all request in my > existing applications. > > Exemple : > > app/controller/login/login.rb > > use a model in : > > app/models/login/connect.rb > > This exemple give the error : > > " Login is not missing constant Connect! " > > What''s wrong im my configuration ? >app/models/login/connect.rb ^^^^ whats wrong with your model? why have to stuck them inside login folder? If you must do something like that, then make sure, you inherit stuff properly. I have seen this stuff before, when i i tried to do something like this, in one of my plugins. class ActiveRecord::Schema # some migration foobar end Rewriting above code like this: module ActiveRecord class Schema # some migration foobar end end fixed the error. :) -- gnufied --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frioffol Friofool
2007-Apr-18 17:06 UTC
Re: '' X is not missing constant Y '' , problem after rails up
i put this file in model/login/connect.rb to have a clean structure. my connect.rb is : class Login::Connect < ActiveRecord::Base end and my login.rb is : class Login::LoginController < ApplicationController end Maybe there is a best method to do that, but before i update my rails version, the application works fine. i don''t know what to do... -- Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Suraj Kurapati
2009-Jun-05 21:28 UTC
Re: '' X is not missing constant Y '' , problem after rails up
Hemant Kumar wrote:> I have seen this stuff before, when i i tried to do something like > this, in one of my plugins. > > class ActiveRecord::Schema > # some migration foobar > end > > Rewriting above code like this: > > module ActiveRecord > class Schema > # some migration foobar > end > end > > fixed the error. :)In Rails 2.x, this approach only takes us halfway to the solution. See this bug report[1] for the rest of the solution, which involves monkeypatching the load_missing_constant() method. [1] https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2283-unnecessary-exception-raised-in-asdependenciesload_missing_constant -- Posted via http://www.ruby-forum.com/.