Forum: Ruby on Rails Expected ... to define ...

Posted by Juan (Guest)
on 2006-08-17 02:31
Hi,

I have edge frozen on vendor, and getting these errors logged:

Expected ../config/../app/controllers/store_controller.rb to define 
StoreController
../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:177:in 
`load_missing_constant'
../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:275:in 
`const_missing'
../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:282:in 
`const_missing'
../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/inflector.rb:162:in 
`constantize'
../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/string/inflections.rb:148:in 
`constantize'
../config/../vendor/rails/actionpack/lib/action_controller/routing.rb:1035:in 
`recognize'
../config/../vendor/rails/railties/lib/dispatcher.rb:40:in `dispatch'
../config/../vendor/rails/railties/lib/fcgi_handler.rb:150:in 
`process_request'
../config/../vendor/rails/railties/lib/fcgi_handler.rb:54:in `process!'
/usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi'
/usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi'
../config/../vendor/rails/railties/lib/fcgi_handler.rb:53:in `process!'
../config/../vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!'
dispatch.fcgi:24

Has anyone seen this? Any hints to fix it?

Thank you.
Posted by James H (Guest)
on 2007-02-24 23:30
Juan wrote:
> Hi,
> 
> I have edge frozen on vendor, and getting these errors logged:
> 
> Expected ../config/../app/controllers/store_controller.rb to define 
> StoreController
> ../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:177:in 
> `load_missing_constant'
> ../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:275:in 
> `const_missing'
> ../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:282:in 
> `const_missing'
> ../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/inflector.rb:162:in 
> `constantize'
> ../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/string/inflections.rb:148:in 
> `constantize'
> ../config/../vendor/rails/actionpack/lib/action_controller/routing.rb:1035:in 
> `recognize'
> ../config/../vendor/rails/railties/lib/dispatcher.rb:40:in `dispatch'
> ../config/../vendor/rails/railties/lib/fcgi_handler.rb:150:in 
> `process_request'
> ../config/../vendor/rails/railties/lib/fcgi_handler.rb:54:in `process!'
> /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi'
> /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi'
> ../config/../vendor/rails/railties/lib/fcgi_handler.rb:53:in `process!'
> ../config/../vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!'
> dispatch.fcgi:24
> 
> Has anyone seen this? Any hints to fix it?
> 
> Thank you.

Did anyone ever figure out what this was about?  I'm getting the same 
error and I'm not entirely sure what's wrong.  It's occurring on a 
model, and the problem goes away when I comment out the Acts_As_Ferret 
plugin.

James H
Posted by Michael Kovacs (Guest)
on 2007-05-27 09:01
James H wrote:
> Juan wrote:
>> Hi,
>> 
>> I have edge frozen on vendor, and getting these errors logged:
>> 
>> Expected ../config/../app/controllers/store_controller.rb to define 
>> StoreController
>> ../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:177:in 
>> `load_missing_constant'
>> ../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:275:in 
>> `const_missing'
>> ../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:282:in 
>> `const_missing'
>> ../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/inflector.rb:162:in 
>> `constantize'
>> ../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/string/inflections.rb:148:in 
>> `constantize'
>> ../config/../vendor/rails/actionpack/lib/action_controller/routing.rb:1035:in 
>> `recognize'
>> ../config/../vendor/rails/railties/lib/dispatcher.rb:40:in `dispatch'
>> ../config/../vendor/rails/railties/lib/fcgi_handler.rb:150:in 
>> `process_request'
>> ../config/../vendor/rails/railties/lib/fcgi_handler.rb:54:in `process!'
>> /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi'
>> /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi'
>> ../config/../vendor/rails/railties/lib/fcgi_handler.rb:53:in `process!'
>> ../config/../vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!'
>> dispatch.fcgi:24
>> 
>> Has anyone seen this? Any hints to fix it?
>> 
>> Thank you.
> 
> Did anyone ever figure out what this was about?  I'm getting the same 
> error and I'm not entirely sure what's wrong.  It's occurring on a 
> model, and the problem goes away when I comment out the Acts_As_Ferret 
> plugin.
> 
> James H

I too am now seeing this problem with 1.2.3 and one of my model classes. 
The problem is intermittent for me and it seems I can get rid of it by 
bouncing my mongrels when it happens.

Will post again if I figure out what it is.

-Michael
Posted by Dominik Mayer (mad)
on 2007-06-21 12:53
so there is noone that solved this? are you still working on a solution 
or have been successful?
Posted by Brian Hogan (Guest)
on 2007-06-21 17:21
(Received via mailing list)
There's an open ticket but we can't get any closure on it.  I actually 
see
this in a controller on a production 1.2.3 app occasionally. It's quite
irritating.

See here for a good start:

http://blog.teksol.info/articles/2007/03/09/expect...

Perhaps if the related ticket at http://dev.rubyonrails.org/ticket/7452 
gets
some more attention, this bug will too.  The problem is that we don't 
get
much attention to bugs from the core unless we can show how to reproduce 
the
problem, which I totally understand.... but this one's a bit difficult 
to
track down or reproduce on demand.

In my case, I bounce the system and I'm good, but apps stopping really
stink.
Posted by Bryan Mahoney (bryanmtl)
on 2007-09-02 13:54
I'm getting this error intermittently as well, but only on production 
running ferret with DRB.

The index crashes and then i get "X was expected to define Y".

Killing ferret and then restarting mongrel gets things running properly 
again, but it's a major pain.

Has anyone found a real solution to this - or is ferret not ready for a 
high-traffic production env?

Cheers ,

Bryan


Brian Hogan wrote:
> There's an open ticket but we can't get any closure on it.  I actually 
> see
> this in a controller on a production 1.2.3 app occasionally. It's quite
> irritating.
> 
> See here for a good start:
> 
> http://blog.teksol.info/articles/2007/03/09/expect...
> 
> Perhaps if the related ticket at http://dev.rubyonrails.org/ticket/7452 
> gets
> some more attention, this bug will too.  The problem is that we don't 
> get
> much attention to bugs from the core unless we can show how to reproduce 
> the
> problem, which I totally understand.... but this one's a bit difficult 
> to
> track down or reproduce on demand.
> 
> In my case, I bounce the system and I'm good, but apps stopping really
> stink.
Posted by Reza Esmily (reza)
on 2008-02-07 19:34
Juan wrote:
> Hi,
> 
> I have edge frozen on vendor, and getting these errors logged:
> 
> Expected ../config/../app/controllers/store_controller.rb to define 
> StoreController ...
> Has anyone seen this? Any hints to fix it?

I had the same error on my production server. It has something to do 
with index files. I changed RAILS_ROOT/index directory permissions to 
something writable by web server and it worked.
Posted by Harry Seldon (harry_seldon)
on 2008-03-26 02:04
Reza Esmily wrote:
> Juan wrote:
>> Hi,
>> 
>> I have edge frozen on vendor, and getting these errors logged:
>> 
>> Expected ../config/../app/controllers/store_controller.rb to define 
>> StoreController ...
>> Has anyone seen this? Any hints to fix it?
> 
> I had the same error on my production server. It has something to do 
> with index files. I changed RAILS_ROOT/index directory permissions to 
> something writable by web server and it worked.

Hi
I got into the same troubles with ferret. But I don't manage to get it 
working.
What do you mean exactly by "something writable by web server" ? I tried 
a
chmod -R 777 index but it did not solve my problem.

H
Posted by Frederick Cheung (Guest)
on 2008-03-26 08:45
(Received via mailing list)
On 26 Mar 2008, at 01:04, Harry Seldon wrote:

>>
> chmod -R 777 index but it did not solve my problem.
It's a general 'Something went bad when trying to load
store_controller.rb' (and rather unhelpful).
It can be a syntax error in store_controller, a require which threw a
LoadError etc...

Fred
Posted by François Montel (zerohalo)
on 2008-07-05 20:44
I've experienced the same, but making index/ writable by web server and 
restarting ferret solved the issue. It's definitely (in my case) related 
to acts_as_ferret.
Posted by François Montel (zerohalo)
on 2008-07-12 17:10
François Montel wrote:
> I've experienced the same, but making index/ writable by web server and 
> restarting ferret solved the issue. It's definitely (in my case) related 
> to acts_as_ferret.

Oh, and besides restarting ferret, you'll probably have to restart 
mongrel.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.