hobo_model_controller result not working
Reported by Togg | June 5th, 2010 @ 09:35 PM
After creating a hobo controller named "Statistic" mongrel will crash at startup.
./script/generate hobo_model_controller statistic
exists app/controllers/
exists app/helpers/
create app/views/statistics
exists test/functional/
create app/controllers/statistics_controller.rb
create test/functional/statistics_controller_test.rb
create app/helpers/statistics_helper.rb
./script/server:
=> Booting Mongrel
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:443:in `load_missing_constant': uninitialized constant Statistic (NameError)
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:in `const_missing'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:92:in `const_missing_before_generators'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails_generator/lookup.rb:15:in `const_missing'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/inflector.rb:364:in `constantize'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/inflector.rb:363:in `each'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/inflector.rb:363:in `constantize'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/string/inflections.rb:162:in `constantize'
from /usr/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_controller.rb:86:in `model'
from /usr/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_controller.rb:299:in `available_auto_write_actions'
from /usr/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_controller.rb:287:in `available_auto_actions'
from /usr/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_controller.rb:128:in `auto_actions'
from /home/togg/test/testLog/testLogDb/app/controllers/statistics_controller.rb:5
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:380:in `load_file'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:379:in `load_file'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:259:in `require_or_load'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:425:in `load_missing_constant'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:in `const_missing'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:92:in `const_missing_before_generators'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails_generator/lookup.rb:15:in `const_missing'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/inflector.rb:364:in `constantize'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/inflector.rb:363:in `each'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/inflector.rb:363:in `constantize'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/string/inflections.rb:162:in `constantize'
from /usr/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_controller.rb:61:in `all_controllers'
from /usr/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_controller.rb:57:in `each'
from /usr/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_controller.rb:57:in `all_controllers'
from /usr/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_router.rb:97:in `add_routes_for'
from /usr/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_router.rb:83:in `add_routes'
from /usr/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_router.rb:83:in `each'
from /usr/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_router.rb:83:in `add_routes'
from /usr/lib/ruby/gems/1.8/gems/hobo-1.0.0/rails/../lib/hobo.rb:73:in `add_routes'
from /home/togg/test/testLog/testLogDb/config/routes.rb:6
from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/routing/route_set.rb:227:in `draw'
from /home/togg/test/testLog/testLogDb/config/routes.rb:1
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:145:in `load_without_new_constant_marking'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:145:in `load'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:145:in `load'
from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/routing/route_set.rb:287:in `load_routes!'
from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/routing/route_set.rb:287:in `each'
from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/routing/route_set.rb:287:in `load_routes!'
from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/routing/route_set.rb:267:in `reload!'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:537:in `initialize_routing'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:188:in `process'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `send'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `run'
from /home/togg/test/testLog/testLogDb/config/environment.rb:9
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/commands/server.rb:84
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/server:3
Comments and changes to this ticket
-
Matt Jones June 13th, 2010 @ 03:39 PM
The default
hobo_model_controller
implementation needs a corresponding model - the error appears to indicate that there isn't aStatistic
model in your app.You can get the model-independent stuff with
hobo_controller
, if that's what you need. -
Matt Jones September 14th, 2011 @ 10:48 PM
- State changed from new to invalid
- Milestone order changed from 0 to 0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป