Syntax Error and Other

Hey All,

I am working through the Four Days on Rails app.
I am getting an error on this code in the application_helper.rb
And I do not quite understand this error message.
Is there someone who can help me out deciphering this?

Thanx

Phillip

…/app/models/items_helper.rb:9: odd number list for Hash
img_options[“src”] = img_options[“src”] + “.png” unless
img_options[“src”].include?(".")
^
…/app/models/items_helper.rb:9: syntax error
img_options[“src”] = img_options[“src”] + “.png” unless
img_options[“src”].include?(".")
^

This is the trace

/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in
load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:inload’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:in
require_or_load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:independ_on’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in
require_dependency' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:inrequire_dependency’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/helpers.rb:114:in
default_helper_module!' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/helpers.rb:127:insend’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/helpers.rb:127:in
inherited_without_api' /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/container/action_controller_container.rb:86:ininherited_without_action_controller’
/usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:34:in
`inherited’
#{RAILS_ROOT}/app/controllers/items_controller.rb:1

/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in
load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:inload’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:in
require_or_load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:independ_on’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in
require_dependency' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:inrequire_dependency’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/helpers.rb:114:in
default_helper_module!' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/helpers.rb:127:insend’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/helpers.rb:127:in
inherited_without_api' /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/container/action_controller_container.rb:86:ininherited_without_action_controller’
/usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:34:in
inherited' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:inload’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in
load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:inrequire_or_load’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in
depend_on' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:inrequire_dependency’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in
require_dependency' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:285:inattempt_load’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:281:in
each' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:281:inattempt_load’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:237:in
traverse_to_controller' generated/routing/recognition.rb:3:inrecognize_path’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:511:in
recognize!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:indispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in
process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in
each_cgi' /usr/lib/ruby/1.8/fcgi.rb:597:ineach’
/usr/lib/ruby/1.8/fcgi.rb:597:in each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in
`process!’
dispatch.fcgi:33

/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in
load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:inload’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:in
require_or_load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:independ_on’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in
require_dependency' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:inrequire_dependency’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/helpers.rb:114:in
default_helper_module!' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/helpers.rb:127:insend’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/helpers.rb:127:in
inherited_without_api' /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/container/action_controller_container.rb:86:ininherited_without_action_controller’
/usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:34:in
inherited' #{RAILS_ROOT}/app/controllers/items_controller.rb:1 /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:inload’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in
load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:inrequire_or_load’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in
depend_on' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:inrequire_dependency’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in
require_dependency' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:285:inattempt_load’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:281:in
each' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:281:inattempt_load’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:237:in
traverse_to_controller' generated/routing/recognition.rb:3:inrecognize_path’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:511:in
recognize!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:indispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in
process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in
each_cgi' /usr/lib/ruby/1.8/fcgi.rb:597:ineach’
/usr/lib/ruby/1.8/fcgi.rb:597:in each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in
`process!’
dispatch.fcgi:33

Never mind,

I figured it out.
I was up too late last night and not reading well. :wink:

Was trying to execute a helper file in the models directory.
Removed it and it all worked fine.

Phillip