Issue upgrading to Rails 2.x

3 views
Skip to first unread message

Mauro Botelho

unread,
Jan 19, 2008, 1:10:11 PM1/19/08
to eXPlainPMT Dev
I upgraded to rails 2.x and now I'm getting an exception whenever
trying to load a story regarding the constants. I'm not an experienced
rails developer, so I'm stuck :(

Here's the stack trace:

NameError (uninitialized constant Status):
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/
active_support/dependencies.rb:266:in `load_missing_constant'
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/
active_support/dependencies.rb:453:in `const_missing'
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/
active_support/dependencies.rb:465:in `const_missing'
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/
active_support/inflector.rb:257:in `constantize'
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/
active_support/core_ext/string/inflections.rb:148:in `constantize'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/aggregations.rb:156:in `status'
/app/models/story.rb:165:in `after_initialize'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/callbacks.rb:322:in `send'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/callbacks.rb:322:in `callback'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/base.rb:1265:in `send'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/base.rb:1265:in `instantiate'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations.rb:1547:in `send'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations.rb:1547:in `instantiate'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations.rb:1400:in `instantiate'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/base.rb:1529:in `each_with_index'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations.rb:1397:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations.rb:1397:in `each_with_index'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations.rb:1397:in `instantiate'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations.rb:1125:in `find_with_associations'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations.rb:1122:in `catch'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations.rb:1122:in `find_with_associations'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/base.rb:1159:in `find_every'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/base.rb:452:in `find'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations/has_many_association.rb:66:in `find'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations/association_collection.rb:182:in
`find_target'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations/has_many_association.rb:78:in `load_target'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations/association_proxy.rb:123:in
`method_missing'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/associations/association_collection.rb:162:in
`method_missing'
/app/models/project.rb:64:in
`not_cancelled_and_not_assigned_to_an_iteration'
/app/controllers/stories_controller.rb:21:in `index'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/base.rb:1168:in `send'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/base.rb:1168:in `perform_action_without_filters'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/filters.rb:697:in `call_filters'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/filters.rb:689:in `perform_action_without_benchmark'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'
C:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/rescue.rb:199:in `perform_action_without_caching'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/caching.rb:678:in `perform_action'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/connection_adapters/abstract/query_cache.rb:33:in
`cache'
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/
active_record/query_cache.rb:8:in `cache'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/caching.rb:677:in `perform_action'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/base.rb:524:in `send'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/base.rb:524:in `process_without_filters'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/filters.rb:685:in
`process_without_session_management_support'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/session_management.rb:123:in `process'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/base.rb:388:in `process'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/dispatcher.rb:171:in `handle_request'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/dispatcher.rb:115:in `dispatch'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/dispatcher.rb:126:in `dispatch_cgi'
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/
action_controller/dispatcher.rb:9:in `dispatch'
C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/webrick_server.rb:
112:in `handle_dispatch'
C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/webrick_server.rb:
78:in `service'
C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
C:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
C:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/webrick_server.rb:
62:in `dispatch'
C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/commands/servers/
webrick.rb:66
C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/
active_support/dependencies.rb:496:in `require'
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/
active_support/dependencies.rb:342:in `new_constants_in'
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/
active_support/dependencies.rb:496:in `require'
C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/commands/server.rb:
39
C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
./script/server:3
-e:2:in `load'
-e:2

Mauro Botelho

unread,
Jan 19, 2008, 7:13:01 PM1/19/08
to eXPlainPMT Dev
I solved my own problem.

I had to change the composed_of declaration.

Mauro
Reply all
Reply to author
Forward
0 new messages