Problem integrating with rails2.0

I had my application running fine with rails 1.1.6. I am planning to
shift rails 2.0. As recommended I am trying to make sure it works fine
with rails 1.2.6. But I get the following message on my browser when I
try to access the video page. This works fine with rails 1.1.6.

##################################
NoMethodError in VideoController#3100

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.first

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

c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/
active_support/deprecation.rb:70:in extract_callstack' c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/ active_support/deprecation.rb:59:indeprecation_caller_message’
c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/
active_support/deprecation.rb:55:in deprecation_message' c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/ active_support/deprecation.rb:24:inwarn’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/base.rb:724:in render_with_no_layout' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/layout.rb:256:inrender_without_benchmark’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/benchmarking.rb:50:in render' c:/ruby-186/lib/ruby/1.8/benchmark.rb:293:inmeasure’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/benchmarking.rb:50:in render' C:/work/programs/Programming/ruby/InstantRails/rails_apps/ ulinkx_beta_1_5/app/controllers/video_controller.rb:1790:inmethod_missing’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/base.rb:1104:in send' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/base.rb:1104:inperform_action_without_filters’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/filters.rb:696:in call_filters' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/filters.rb:688:inperform_action_without_benchmark’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/benchmarking.rb:66:in
perform_action_without_rescue' c:/ruby-186/lib/ruby/1.8/benchmark.rb:293:inmeasure’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/benchmarking.rb:66:in
perform_action_without_rescue' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/rescue.rb:83:inperform_action’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/base.rb:435:in send' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/base.rb:435:inprocess_without_filters’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/filters.rb:684:in
process_without_session_management_support' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/session_management.rb:114:inprocess’
C:/work/programs/Programming/ruby/InstantRails/rails_apps/
ulinkx_beta_1_5/app/controllers/application.rb:104:in process' C:/work/programs/Programming/ruby/InstantRails/rails_apps/ ulinkx_beta_1_5/app/controllers/application.rb:103:incatch’
C:/work/programs/Programming/ruby/InstantRails/rails_apps/
ulinkx_beta_1_5/app/controllers/application.rb:103:in process' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/base.rb:334:inprocess’
c:/ruby-186/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/dispatcher.rb:41:in
dispatch' c:/ruby-186/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/webrick_server.rb: 113:inhandle_dispatch’
c:/ruby-186/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/webrick_server.rb:
79:in service' c:/ruby-186/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
c:/ruby-186/lib/ruby/1.8/webrick/httpserver.rb:65:in run' c:/ruby-186/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
c:/ruby-186/lib/ruby/1.8/webrick/server.rb:162:in start' c:/ruby-186/lib/ruby/1.8/webrick/server.rb:162:instart_thread’
c:/ruby-186/lib/ruby/1.8/webrick/server.rb:95:in start' c:/ruby-186/lib/ruby/1.8/webrick/server.rb:92:ineach’
c:/ruby-186/lib/ruby/1.8/webrick/server.rb:92:in start' c:/ruby-186/lib/ruby/1.8/webrick/server.rb:23:instart’
c:/ruby-186/lib/ruby/1.8/webrick/server.rb:82:in start' c:/ruby-186/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/webrick_server.rb: 63:indispatch’
c:/ruby-186/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/commands/servers/
webrick.rb:59
c:/ruby-186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' c:/ruby-186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/
active_support/dependencies.rb:495:in require' c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/ active_support/dependencies.rb:342:innew_constants_in’
c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/
active_support/dependencies.rb:495:in require' c:/ruby-186/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/commands/server.rb: 39 c:/ruby-186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
c:/ruby-186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
script/server:3

c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/
active_support/deprecation.rb:70:in extract_callstack' c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/ active_support/deprecation.rb:59:indeprecation_caller_message’
c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/
active_support/deprecation.rb:55:in deprecation_message' c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/ active_support/deprecation.rb:24:inwarn’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/base.rb:724:in render_with_no_layout' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/layout.rb:256:inrender_without_benchmark’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/benchmarking.rb:50:in render' c:/ruby-186/lib/ruby/1.8/benchmark.rb:293:inmeasure’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/benchmarking.rb:50:in render' C:/work/programs/Programming/ruby/InstantRails/rails_apps/ ulinkx_beta_1_5/app/controllers/video_controller.rb:1790:inmethod_missing’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/base.rb:1104:in send' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/base.rb:1104:inperform_action_without_filters’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/filters.rb:696:in call_filters' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/filters.rb:688:inperform_action_without_benchmark’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/benchmarking.rb:66:in
perform_action_without_rescue' c:/ruby-186/lib/ruby/1.8/benchmark.rb:293:inmeasure’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/benchmarking.rb:66:in
perform_action_without_rescue' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/rescue.rb:83:inperform_action’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/base.rb:435:in send' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/base.rb:435:inprocess_without_filters’
c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/
action_controller/filters.rb:684:in
process_without_session_management_support' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/session_management.rb:114:inprocess’
C:/work/programs/Programming/ruby/InstantRails/rails_apps/
ulinkx_beta_1_5/app/controllers/application.rb:104:in process' C:/work/programs/Programming/ruby/InstantRails/rails_apps/ ulinkx_beta_1_5/app/controllers/application.rb:103:incatch’
C:/work/programs/Programming/ruby/InstantRails/rails_apps/
ulinkx_beta_1_5/app/controllers/application.rb:103:in process' c:/ruby-186/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/ action_controller/base.rb:334:inprocess’
c:/ruby-186/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/dispatcher.rb:41:in
dispatch' c:/ruby-186/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/webrick_server.rb: 113:inhandle_dispatch’
c:/ruby-186/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/webrick_server.rb:
79:in service' c:/ruby-186/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
c:/ruby-186/lib/ruby/1.8/webrick/httpserver.rb:65:in run' c:/ruby-186/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
c:/ruby-186/lib/ruby/1.8/webrick/server.rb:162:in start' c:/ruby-186/lib/ruby/1.8/webrick/server.rb:162:instart_thread’
c:/ruby-186/lib/ruby/1.8/webrick/server.rb:95:in start' c:/ruby-186/lib/ruby/1.8/webrick/server.rb:92:ineach’
c:/ruby-186/lib/ruby/1.8/webrick/server.rb:92:in start' c:/ruby-186/lib/ruby/1.8/webrick/server.rb:23:instart’
c:/ruby-186/lib/ruby/1.8/webrick/server.rb:82:in start' c:/ruby-186/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/webrick_server.rb: 63:indispatch’
c:/ruby-186/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/commands/servers/
webrick.rb:59
c:/ruby-186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' c:/ruby-186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/
active_support/dependencies.rb:495:in require' c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/ active_support/dependencies.rb:342:innew_constants_in’
c:/ruby-186/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/
active_support/dependencies.rb:495:in require' c:/ruby-186/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/commands/server.rb: 39 c:/ruby-186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
c:/ruby-186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
script/server:3

Request

Parameters: {“id”=>“eruption_performed_by_j_r_zgorski”}

Show session dump


:s: ulinkx
:top_ad_type: google
:watch_history_on: “1”
:last_url: /video/home/
:q: sales
:box_250_ad_type: google
:family_filter: “1”
:site_name: myspace
:sky_ad_type: google
:addtype: 0
:redirect_login: 1
:current_tab: home
flash: !map:ActionController::Flash::FlashHash
:notice: Sorry, we could not find the page you are looking for
:view: grid

Response
Headers: {“Status”=>“200 OK”, “P3P”=>“CP=“NOI DSP COR NID ADMa OPTa
OUR NOR””, “cookie”=>[], “Cache-Control”=>“no-cache”}

It’s hard to guess just from the callstack. Is there anything
interesting at

C:/work/programs/Programming/ruby/InstantRails/rails_apps/
ulinkx_beta_1_5/app/controllers/video_controller.rb:1790

(By the way, 1790+ line controller: yikes)

Fred

On 8 Jan 2008, at 09:15, aks wrote:

Thanks Frederick.

I have a call to render (render ‘/video/onevideo’).

That’s deprecated (and it looks like rails is trying to tell you that.
You should be using either render :file => ‘/video/onevideo’, or it
looks like render :action => ‘onevideo’ might do the trick

Fred

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