# Problem integrating with rails2.0

**URL:** <https://www.ruby-forum.com/t/problem-integrating-with-rails2-0/125327>\
**Category:** Rails\
**Created:** [January 8, 2008, 9:37am UTC](https://www.ruby-forum.com/t/problem-integrating-with-rails2-0/125327 "2008-01-08T09:37:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aks](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@aks](https://www.ruby-forum.com/u/aks)\
**Post date:** [January 8, 2008, 9:37am UTC](https://www.ruby-forum.com/t/problem-integrating-with-rails2-0/125327/1 "2008-01-08T09:37:31Z")

</div>

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:in`deprecation\_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:in`warn’  
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:in`render\_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:in`measure’  
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:in`method\_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:in`perform\_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:in`perform\_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:in`measure’  
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:in`perform\_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:in`process\_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:in`process’  
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:in`catch’  
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:in`process’  
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:in`handle\_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:in`service’  
c:/ruby-186/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' c:/ruby-186/lib/ruby/1.8/webrick/server.rb:173:in`start\_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:in`start\_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:in`each’  
c:/ruby-186/lib/ruby/1.8/webrick/server.rb:92:in `start' c:/ruby-186/lib/ruby/1.8/webrick/server.rb:23:in`start’  
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:in`dispatch’  
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:in`require’  
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:in`new\_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:in`gem\_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:in`deprecation\_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:in`warn’  
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:in`render\_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:in`measure’  
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:in`method\_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:in`perform\_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:in`perform\_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:in`measure’  
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:in`perform\_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:in`process\_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:in`process’  
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:in`catch’  
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:in`process’  
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:in`handle\_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:in`service’  
c:/ruby-186/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' c:/ruby-186/lib/ruby/1.8/webrick/server.rb:173:in`start\_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:in`start\_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:in`each’  
c:/ruby-186/lib/ruby/1.8/webrick/server.rb:92:in `start' c:/ruby-186/lib/ruby/1.8/webrick/server.rb:23:in`start’  
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:in`dispatch’  
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:in`require’  
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:in`new\_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:in`gem\_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”}

---

<div class="post-metadata">

**Author:** ![aks](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@aks](https://www.ruby-forum.com/u/aks)\
**Post date:** [January 8, 2008, 9:59am UTC](https://www.ruby-forum.com/t/problem-integrating-with-rails2-0/125327/2 "2008-01-08T09:59:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aks](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@aks](https://www.ruby-forum.com/u/aks)\
**Post date:** [January 9, 2008, 3:27am UTC](https://www.ruby-forum.com/t/problem-integrating-with-rails2-0/125327/3 "2008-01-09T03:27:39Z")

</div>

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
