Hi guys, I'm new to CE and just starting to use it for a project.
Encountered this error and hoping to learn more about it here. After
creating a new user controller and views, I get this error on my
development environment from trying to load http://localhost:3000/
Processing UsersController#show to ico (for 127.0.0.1 at 2009-12-14
14:41:11) [GET]
Parameters: {"id"=>"favicon"}
[I18n] loading locale: en from config
[I18n] Locale set to en
User Load (0.3ms) SELECT * FROM "users" WHERE
("users"."login_slug" IN ('favicon')) AND (users.activated_at IS NOT
NULL) LIMIT 1
NoMethodError (You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.inject):
vendor/plugins/community_engine/app/controllers/base_controller.rb:
88:in `find_user'
haml (2.2.15) lib/sass/plugin/rails.rb:19:in `process'
/Users/chongkee/.gem/ruby/1.8/gems/ruby-debug-ide-0.4.9/lib/ruby-
debug-ide.rb:109:in `debug_load'
/Users/chongkee/.gem/ruby/1.8/gems/ruby-debug-ide-0.4.9/lib/ruby-
debug-ide.rb:109:in `debug_program'
/Users/chongkee/.gem/ruby/1.8/gems/ruby-debug-ide-0.4.9/bin/rdebug-
ide:87
/Users/chongkee/.gem/ruby/1.8/bin/rdebug-ide:19:in `load'
/Users/chongkee/.gem/ruby/1.8/bin/rdebug-ide:19
-e:1:in `load'
-e:1
Rendered rescues/_trace (115.3ms)
Rendered rescues/_request_and_response (0.6ms)
Rendering rescues/layout (internal_server_error)
*******************
Seems like it cannot find the resource to translate the #en string.
When I copied the content of Base.yml and en-US.yml file from vendor/
and appended them to my own Base and en_US files in my own lang/
directory, the error went away. Is there any reason why?
Chong Kee
-------------------------------
Here is the trace when it choked:
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:206:in
`deep_symbolize_keys'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:197:in
`merge_translations'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:177:in
`load_file'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:177:in
`each'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:177:in
`load_file'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:13:in
`load_translations'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:13:in
`each'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:13:in
`load_translations'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:85:in
`init_translations'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:100:in
`lookup'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:33:in
`translate'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/vendor/i18n-0.1.3/lib/i18n.rb:165:in `translate'
/Users/chongkee/dev/hnl/trunk/hnl/vendor/plugins/community_engine/lib/
globalite_extensions.rb:26:in `l'
/Users/chongkee/dev/hnl/trunk/hnl/vendor/plugins/community_engine/app/
controllers/base_controller.rb:38:in `site_index'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/base.rb:1322:in `send'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/base.rb:1322:in `perform_action_without_filters'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/filters.rb:617:in `call_filters'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/filters.rb:638:in `run_before_filters'
/Users/chongkee/dev/hnl/trunk/hnl/vendor/plugins/community_engine/lib/
localized_application.rb:25:in `set_locale'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/callbacks.rb:178:in `send'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/callbacks.rb:178:in `evaluate_method'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/filters.rb:186:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/filters.rb:635:in `run_before_filters'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/filters.rb:615:in `call_filters'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/filters.rb:610:in `perform_action_without_benchmark'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/core_ext/benchmark.rb:17:in `ms'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/benchmark.rb:308:in `realtime'
/Users/chongkee/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/core_ext/benchmark.rb:17:in `ms'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/rescue.rb:160:in `perform_action_without_flash'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/flash.rb:141:in `perform_action'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/base.rb:523:in `send'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/base.rb:523:in `process_without_filters'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/filters.rb:606:in `sass_old_process'
/Users/chongkee/.gem/ruby/1.8/gems/haml-2.2.15/lib/sass/plugin/
rails.rb:19:in `process'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/base.rb:391:in `process'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/base.rb:386:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/routing/route_set.rb:433:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/dispatcher.rb:88:in `dispatch'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/dispatcher.rb:111:in `_call'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/dispatcher.rb:82:in `initialize'
/Users/chongkee/dev/hnl/trunk/hnl/vendor/plugins/community_engine/lib/
flash_session_cookie_middleware.rb:14:in `call'
/Users/chongkee/dev/hnl/trunk/hnl/vendor/plugins/community_engine/lib/
flash_session_cookie_middleware.rb:14:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/activerecord-2.3.2/lib/
active_record/query_cache.rb:29:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/activerecord-2.3.2/lib/
active_record/connection_adapters/abstract/query_cache.rb:34:in
`cache'
/Users/chongkee/.gem/ruby/1.8/gems/activerecord-2.3.2/lib/
active_record/query_cache.rb:9:in `cache'
/Users/chongkee/.gem/ruby/1.8/gems/activerecord-2.3.2/lib/
active_record/query_cache.rb:28:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/activerecord-2.3.2/lib/
active_record/connection_adapters/abstract/connection_pool.rb:361:in
`call'
/Users/chongkee/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in
`call'
/Users/chongkee/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/
methodoverride.rb:24:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/params_parser.rb:15:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/rewindable_input.rb:25:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/session/cookie_store.rb:93:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/reloader.rb:9:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/failsafe.rb:11:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in
`call'
/Users/chongkee/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in
`synchronize'
/Users/chongkee/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in
`call'
/Users/chongkee/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/
action_controller/dispatcher.rb:106:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/rails-2.3.2/lib/rails/rack/
static.rb:31:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in
`call'
/Users/chongkee/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in
`each'
/Users/chongkee/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in
`call'
/Users/chongkee/.gem/ruby/1.8/gems/rails-2.3.2/lib/rails/rack/
log_tailer.rb:17:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/
content_length.rb:13:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/chunked.rb:
15:in `call'
/Users/chongkee/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/handler/
mongrel.rb:64:in `process'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
/Users/chongkee/.gem/ruby/1.8/gems/rack-1.0.1/lib/rack/handler/
mongrel.rb:34:in `run'
/Users/chongkee/.gem/ruby/1.8/gems/rails-2.3.2/lib/commands/server.rb:
111
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
/Users/chongkee/dev/hnl/trunk/hnl/script/server:3
/Users/chongkee/.gem/ruby/1.8/gems/ruby-debug-ide-0.4.9/lib/ruby-debug-
ide.rb:109:in `debug_load'
/Users/chongkee/.gem/ruby/1.8/gems/ruby-debug-ide-0.4.9/lib/ruby-debug-
ide.rb:109:in `debug_program'
/Users/chongkee/.gem/ruby/1.8/gems/ruby-debug-ide-0.4.9/bin/rdebug-ide:
87
/Users/chongkee/.gem/ruby/1.8/bin/rdebug-ide:19:in `load'
/Users/chongkee/.gem/ruby/1.8/bin/rdebug-ide:19
-e:1:in `load'
-e:1
--
You received this message because you are subscribed to the Google Groups
"CommunityEngine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/communityengine?hl=en.