NoMethodError

hi!

i was trying to run a rails based app, however i am stumped by the error
as shown below. i get this kind of error everywhere. for example if i
click on Company information, i would get this:

NoMethodError in Administration#company

Showing vendor/plugins/coupa_engine/app/views/layouts/coupa.rhtml where
line #6 raised:

undefined method `length’ for #Enumerable::Enumerator:0x7ff2c489d028

Extracted source (around line #6):

3:
4: This program is free software; you can redistribute it and/or
modify
5: it under the terms of the GNU General Public License as published
by
6: the Free Software Foundation; either version 2 of the License, or
7: (at your option) any later version.
8:
9: This program is distributed in the hope that it will be useful,

RAILS_ROOT: script/…/config/…
Application Trace | Framework Trace | Full Trace

/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/text_helper.rb:36:in
truncate' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:326:insend’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:326:in
compile_and_render_template' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:301:inrender_template’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:260:in
render_file' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/layout.rb:254:inrender_without_benchmark’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:50:in
render' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:50:inrender’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1096:in
perform_action_without_filters' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:incall_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in
call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:incall’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in
call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:incall_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in
call' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:incall_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in
call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:449:incall’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in
call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:inperform_action_without_benchmark’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in
perform_action_without_rescue' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:inperform_action_without_rescue’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in
perform_action' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:insend’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in
process_without_filters' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:inprocess_without_session_management_support’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in
process_without_test' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/test_process.rb:15:inprocess’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in
process' /var/lib/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:inservice’
/var/lib/gems/1.8/gems/rails-1.2.3/lib/commands/servers/webrick.rb:59
/var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
require' /var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:innew_constants_in’
/var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require’
/var/lib/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39

#{RAILS_ROOT}/vendor/plugins/coupa_engine/app/views/layouts/coupa.rhtml:6:in
_run_rhtml_47vendor47plugins47coupa_engine47app47views47layouts47coupa46rhtml' /usr/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /var/lib/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:indispatch’
/var/lib/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:in
handle_dispatch' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start' /usr/lib/ruby/1.8/webrick/server.rb:162:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/lib/ruby/1.8/webrick/server.rb:92:ineach’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:instart’
/usr/lib/ruby/1.8/webrick/server.rb:82:in start' /var/lib/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:indispatch’
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:inrequire’
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:inrequire’
script/server:3

/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/text_helper.rb:36:in
truncate' #{RAILS_ROOT}/vendor/plugins/coupa_engine/app/views/layouts/coupa.rhtml:6:in_run_rhtml_47vendor47plugins47coupa_engine47app47views47layouts47coupa46rhtml’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:326:in
send' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:326:incompile_and_render_template’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:301:in
render_template' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:260:inrender_file’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/layout.rb:254:in
render_without_benchmark' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:50:inrender’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:50:inrender’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1096:in
perform_action_without_filters' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:incall_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in
call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:incall’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in
call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:incall_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in
call' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:incall_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in
call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:449:incall’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in
call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:inperform_action_without_benchmark’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in
perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in
perform_action_without_rescue' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:inperform_action’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in
send' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:inprocess_without_filters’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in
process_without_session_management_support' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:inprocess_without_test’
/var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/test_process.rb:15:in
process' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:inprocess’
/var/lib/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in dispatch' /var/lib/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:inhandle_dispatch’
/var/lib/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start' /usr/lib/ruby/1.8/webrick/server.rb:162:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/lib/ruby/1.8/webrick/server.rb:92:ineach’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:instart’
/usr/lib/ruby/1.8/webrick/server.rb:82:in start' /var/lib/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:indispatch’
/var/lib/gems/1.8/gems/rails-1.2.3/lib/commands/servers/webrick.rb:59
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:inrequire’
/var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
require' /var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:innew_constants_in’
/var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
require' /var/lib/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require’
script/server:3

Request

Parameters: None

Show session dump


prev_uri: /administration/company
return-to:
:user: &id001 !ruby/object:User
address_assignments:
addresses:
approval_limit:
attributes:
salt: 93c682538d8a6cb278197e2af0aa612a0c7cac9d
default_account_id:
created_at: 2009-04-19 03:43:01
delete_after:
updated_at: 2009-04-19 03:43:12.331075 +00:00
deleted_at:
role:
security_token:
manager_id:
default_currency_id: “1”
pcard_id:
id: “29”
lastname: e
token_expiry:
deleted: “0”
phone_work: “”
firstname: joey
logged_in_at: 2009-04-19 03:43:12.323429 +00:00
approval_limit_id:
verified: “1”
default_address_id:
login: admin
salted_password: 4ac2e1bd1e9ba29259a004a2b0143fb0984c10cf
status: active
email: [email protected]
phone_mobile: “”
children:
default_account:
default_address:
default_currency:
errors: !ruby/object:ActiveRecord::Errors
base: *id001
errors: {}

new_password: false
new_record_before_save:
parent:
pcard:
roles:

  • !ruby/object:Role
    attributes:
    name: Admin
    role_id: “2”
    omnipotent: “1”
    id: “2”
    user_id: “29”
    system_role: “1”
    description: Full system access
  • !ruby/object:Role
    attributes:
    name: User
    role_id: “3”
    omnipotent: “0”
    id: “3”
    user_id: “29”
    system_role: “1”
    description: Default role for all logged-in users
    subscribed_ask_categories:
    subscriptions:
    flash: !map:ActionController::Flash::FlashHash {}

Response
Headers: {“Status”=>“200 OK”, “cookie”=>[], “Cache-Control”=>“no-cache”}

these are gems:

actionmailer (2.3.2, 1.3.3)
actionpack (2.3.2, 2.2.2, 1.13.3)
actionwebservice (1.2.3)
activerecord (2.3.2, 2.2.2, 1.15.3)
activesupport (2.3.2, 2.2.2, 1.4.2)
acts_as_ferret (0.4.1)
rails (1.2.3)
rake (0.8.4, 0.7.3)
rtf (0.1.0)
vpim (0.695)

any ideas on how get through the error?

thanks!

joey

On Apr 23, 3:02 pm, Joey B. [email protected] wrote:

any ideas on how get through the error?

it looks like you are running a rails 1.2.3 app against ruby 1.8.7
(which isn;t compatible with rails 1.2.3)

Fred

Frederick C. wrote:

On Apr 23, 3:02�pm, Joey B. [email protected] wrote:

it looks like you are running a rails 1.2.3 app against ruby 1.8.7
(which isn;t compatible with rails 1.2.3)

hi!

thanks. that’ll most likely be the reason. i know it’s a problem on my
setup, not on the application.

so which ruby version can i use with rails 1.2.3? how do i downgrade?

thanks!

joey

On Apr 23, 3:53 pm, Joey B. [email protected] wrote:

so which ruby version can i use with rails 1.2.3? how do i downgrade?

1.8.6 is probably fine. how to install would depend on your platform.

Fred

Frederick C. wrote:

On Apr 23, 3:53�pm, Joey B. [email protected] wrote:

so which ruby version can i use with rails 1.2.3? how do i downgrade?

1.8.6 is probably fine. how to install would depend on your platform.

Fred

hi!

i’m on linux. how to downgrade?

thx.

Joey B. wrote:

Frederick C. wrote:

On Apr 23, 3:53�pm, Joey B. [email protected] wrote:

so which ruby version can i use with rails 1.2.3? how do i downgrade?

1.8.6 is probably fine. how to install would depend on your platform.

Fred

hi!

i’m on linux. how to downgrade?

thx.

it’s ok. found it. thx for telling me its the version.

thx!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs