These errors did NOT occur in the release candidate #2. `load_missing_constant'': Expected /Users/baldwina/svn/xxxx/trunk/config/../lib/customer.rb to define Customer (LoadError) The customer.rb file does define class Customer. Here is another example: LoadError: Expected /Users/baldwina/svn/xxxx/trunk/config/../app/models/status.rb to define Status Again, status.rb does define Status. Did I jump on 1.2 too early? Aaron --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''m seeing the same thing. It happens in tests. Also happens on 1.2.1. Works fine in RC2 and 1.1.6. This seems to be related to referring to the class in question from environment.rb . Commenting out the sections of custom code in environment.rb solves the problem, but now parts of the rest of the app don''t work anymore since certain things weren''t setup right in environment.rb. Any suggestions would be appreciated. I see a different error when trying to start the server, but commenting out the same lines in environment.rb fixes that too. Aaron Baldwin wrote:> These errors did NOT occur in the release candidate #2. > > `load_missing_constant'': Expected > /Users/baldwina/svn/xxxx/trunk/config/../lib/customer.rb > to define Customer (LoadError) > > The customer.rb file does define class Customer. > > Here is another example: > LoadError: Expected > /Users/baldwina/svn/xxxx/trunk/config/../app/models/status.rb to define > Status > > Again, status.rb does define Status. > > Did I jump on 1.2 too early? > > Aaron > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Aaron Baldwin wrote:> Did I jump on 1.2 too early? > > AaronHave you seen this from: http://weblog.rubyonrails.org/2007/1/19/rails-1-2-rest-admiration-http-lovefest-and-utf-8-celebrations [blockquote] Auto-loading Weve fixed a bug that allowed libraries from Rubys standard library to be auto-loaded on reference. Before, if you merely reference the Pathname constant, wed autoload pathname.rb. No more, youll need to manually require ''pathname'' now. Weve also improved the handling of module loading, which means that a reference for Accounting::Subscription will look for app/models/accounting/subscription.rb. At the same time, that means that merely referencing Subscription will not look for subscription.rb in any subdir of app/models. Only app/models/subscription.rb will be tried. If you for some reason depended on this, you can still get it back by adding app/models/accounting to config.load_paths in config/environment.rb. [/blockquote] -- 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
This is a long shot, installed 1.2.1, but in my app that matters, server won''t start (will start with other apps): ** Starting Rails with development environment ... C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:377:in `new_constants_in'': You have a nil object when you didn''t expect it! (NoMethodError) You might have expected an instance of Array. The error occurred while evaluating nil.empty? from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:203:in `load_file'' from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:95:in `require_or_load'' from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:61:in `depend_on'' from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:443:in `require_dependency'' from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/helpers.rb:67:in `helper'' from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/helpers.rb:58:in `helper'' from C:/InstantRails/rails_apps/pazap/config/../vendor/plugins/debug-view-helper/lib/view_debug_helper.rb:94 from C:/InstantRails/rails_apps/pazap/config/../vendor/plugins/debug-view-helper/lib/view_debug_helper.rb:93 ... 20 levels... from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel/command.rb:199:in `run'' from C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/bin/mongrel_rails:235 from C:\InstantRails\ruby\bin\mongrel_rails:18 from -e:3 is it perhaps running into a plugin it doesn''t like? Anyone else having this error? -- 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 -~----------~----~----~----~------~----~------~--~---
I don''t think this is it. All the people I''ve seen complaining of this is with loading models and controllers, which isn''t affected by what you mention here. It''s finding the correct file to load what it is looking for, it''s just claiming the class doesn''t exist in that file when it does. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hey Could you post your environment.rb file to the list with the offending methods included? Providing they aren''t sensitive to our scrutiny :) Regards, Gustav Paul Jon Garvin wrote:> > I''m seeing the same thing. It happens in tests. Also happens on 1.2.1. > Works fine in RC2 and 1.1.6. > This seems to be related to referring to the class in question from > environment.rb . Commenting out the sections of custom code in > environment.rb solves the problem, but now parts of the rest of the app > don''t work anymore since certain things weren''t setup right in > environment.rb. Any suggestions would be appreciated. > > I see a different error when trying to start the server, but commenting > out the same lines in environment.rb fixes that too. > > Aaron Baldwin wrote: >> These errors did NOT occur in the release candidate #2. >> >> `load_missing_constant'': Expected >> /Users/baldwina/svn/xxxx/trunk/config/../lib/customer.rb >> to define Customer (LoadError) >> >> The customer.rb file does define class Customer. >> >> Here is another example: >> LoadError: Expected >> /Users/baldwina/svn/xxxx/trunk/config/../app/models/status.rb to define >> Status >> >> Again, status.rb does define Status. >> >> Did I jump on 1.2 too early? >> >> Aaron >> >> > >> > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Aaron Baldwin wrote:> These errors did NOT occur in the release candidate #2. > > `load_missing_constant'': Expected > /Users/baldwina/svn/xxxx/trunk/config/../lib/customer.rb > to define Customer (LoadError)I was having this error with the railsdav plugin. I was able to fix it by adding a line that says require "railsdav" to the vendor/plugins/railsdav/init.rb -- 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 -~----------~----~----~----~------~----~------~--~---
I''ve noticed that my problem with loading models is only in the development environment. Specifically, if I turn on the caching of loaded classes in config/environments/development.rb (config.cache_classes = true) my problem goes away. (Not really since it I want to not cache the classes in dev.) Is your problem occuring regardless of the cache setting? Or does the cache setting impact what occurs? Andrew Selder wrote:> I don''t think this is it. > > All the people I''ve seen complaining of this is with loading models and > controllers, which isn''t affected by what you mention here. > > It''s finding the correct file to load what it is looking for, it''s just > claiming the class doesn''t exist in that file when it does.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
per Alan''s reply, I added a few strategic requires and that seems to have greatly improved the situation. Server starts now, but now there are other errors indicating I still have more to do. Thanks all for the assistance. I think I can take it from here. Gustav Paul wrote:> > Hey > > Could you post your environment.rb file to the list with the offending > methods included? Providing they aren''t sensitive to our scrutiny :) > > Regards, > Gustav Paul--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Fri, 2007-01-19 at 18:27 +0100, Tony Buser wrote:> Aaron Baldwin wrote: > > These errors did NOT occur in the release candidate #2. > > > > `load_missing_constant'': Expected > > /Users/baldwina/svn/xxxx/trunk/config/../lib/customer.rb > > to define Customer (LoadError) > > I was having this error with the railsdav plugin. I was able to fix it > by adding a line that says require "railsdav" to the > vendor/plugins/railsdav/init.rb >Was there ever a final answer on this? I too have a ''expected customer.rb to define Customer'' error, when I can see darn well that it''s defined. this is in a rails engine, if that matters and my init_engine.rb does include the engine. Thoughts? matt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Same problem here. It''s definitely plug-in related, and it''s one of these (I only had the following plugins included): default_value enum-column engines (required by datebocks_engine) datebocks_engine I''m still trying to nail this down, but I''m guessing it''s engines based on how much munging it must do. I''ll post as soon as I have a more conclusive answer. Chris matt wrote:> On Fri, 2007-01-19 at 18:27 +0100, Tony Buser wrote: >> > Was there ever a final answer on this? > > I too have a ''expected customer.rb to define Customer'' error, when I can > see darn well that it''s defined. > > this is in a rails engine, if that matters and my init_engine.rb does > include the engine. > > Thoughts? > > matt-- 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 -~----------~----~----~----~------~----~------~--~---
On Sun, 2007-01-28 at 07:16 +0100, Chris wrote:> Same problem here. It''s definitely plug-in related, and it''s one of > these (I only had the following plugins included): > > default_value > enum-column > engines (required by datebocks_engine) > datebocks_engine > > I''m still trying to nail this down, but I''m guessing it''s engines based > on how much munging it must do. > > I''ll post as soon as I have a more conclusive answer.---- please do because I''m going to have to travel this path soon myself and I do use toolbocks (and obviously engines) Thanks Craig --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
As posted to this list a while back, I''m currently soliciting feedback on the upcoming 1.2 release of the engines plugin, which is compatible with Rails 1.2. The "official" release (the one you get at the moment when running script/plugin install engines) is NOT compatible. You can find the current 1.2 release branch at http://svn.rails- engines.org/engines/branches/rb_1.2 - checkout this code into vendor/ plugins for a 1.2-compatible version of the engines plugin. You should also be aware that until the "datebocks" plugin is updated to be compatible with the engines 1.2 release, it will (probably) not work properly. - James On Jan 28, 7:25 am, Craig White <craigwh...-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote:> On Sun, 2007-01-28 at 07:16 +0100, Chris wrote: > > Same problem here. It''s definitely plug-in related, and it''s one of > > these (I only had the following plugins included): > > > default_value > > enum-column > > engines (required by datebocks_engine) > > datebocks_engine > > > I''m still trying to nail this down, but I''m guessing it''s engines based > > on how much munging it must do. > > > I''ll post as soon as I have a more conclusive answer.---- > please do because I''m going to have to travel this path soon myself and > I do use toolbocks (and obviously engines) > > Thanks > > Craig--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Looks like we having similar issues: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/ efeb1eacdf81a0b5/b1eab53f3986b0c5#b1eab53f3986b0c5 On Jan 18, 8:31 pm, "Aaron Baldwin" <baldw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> These errors did NOT occur in the release candidate #2. > > `load_missing_constant'': Expected > /Users/baldwina/svn/xxxx/trunk/config/../lib/customer.rb > to define Customer (LoadError) > > The customer.rb file does define class Customer. > > Here is another example: > LoadError: Expected > /Users/baldwina/svn/xxxx/trunk/config/../app/models/status.rb to define > Status > > Again, status.rb does define Status. > > Did I jump on 1.2 too early? > > Aaron--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chris wrote:> Same problem here. It''s definitely plug-in related, and it''s one of > these (I only had the following plugins included): > > default_value > enum-column > engines (required by datebocks_engine) > datebocks_engine > > I''m still trying to nail this down, but I''m guessing it''s engines based > on how much munging it must do.I''ve seen the same thing. What solved it for me was to change the directory names with dashes (-) in them, to use underscored (_) instead. So enum_column instead of enum-column. Regards, Arjen -- 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 -~----------~----~----~----~------~----~------~--~---