rails 2.3.3 upgrade shows error

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

any ideas ?
Application works fine with rails 2.1.0

Sandip

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

any ideas ?

No, none at all without showing us some code and the error, we are not
telepathic, unless you forgot to do rake rails:update when changing
the version, in which case perhaps I am wrong (about the telepathy).

Colin

@colin

yes … i did " rake rails:update "

–Sandip

One more thing…
This error appears on page where form_tag / form_for got used…

Otherewise, Else works fine !

–Sandip

As I said we are not telepathic, you must show us some code and the error.

Colin

Why don't you create a dummy rails project on 2.3.x and copy your code
over? It isn't as elegant as using the rake task, but it will
work. You will need to rename application.rb to
application_controller.rb, but the rest should be more or less
straightforward.

@mukund

sounds good…but little tedy task.

@colin

/views/sessions/new.html.erb
<% form_tag( session_path, :builder => DavesFormBuilder ) do %>

Login

<%= text_field_tag ‘login’ %>


Password

<%= password_field_tag ‘password’ %>
<%= submit_tag ‘login’%>
<% end %>

url => http://localhost:3000/session/new

–Sandip

@mukund

sounds good...but little tedy task.

@colin

/views/sessions/new.html.erb
<% form_tag( session_path, :builder => DavesFormBuilder ) do %>
<p><label for="login">Login</label><br/>
<%= text_field_tag 'login' %></p>
<p><label for="password">Password</label><br/>
<%= password_field_tag 'password' %>
<%= submit_tag 'login'%>
<% end %>

Nearly there, and the error is? on which line? with the trace.

Colin

Hi Colin

@mukund

sounds good…but little tedy task.

@colin

/views/sessions/new.html.erb

<% form_tag( session_path, :builder => DavesFormBuilder ) do %>

  <p><label for="login">Login</label><br/>
  <%= text_field_tag 'login' %></p>
  <p><label for="password">Password</label><br/>
  <%= password_field_tag 'password' %>
  <%= submit_tag 'login'%>

<% end %>

Nearly there, and the error is? on which line? with the trace.

Error trace is as follows

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

Extracted source (around line #7):

`4:

Sign into System

5:

6:

7: <% form_tag( session_path, :builder => DavesFormBuilder ) do %>

8:

Login

9: <%= text_field_tag ‘login’ %>

10:

Password

`

Application trace
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.3/lib/action_view/helpers/text_helper.rb:32:in `concat'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.3/lib/action_view/helpers/form_tag_helper.rb:467:in `form_tag_in_block'

/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.3/lib/action_view/helpers/form_tag_helper.rb:39:in `form_tag'
/home/demo/ace-trunk/app/views/sessions/new.html.erb:7:in `_run_erb_app47views47sessions47new46html46erb'

Colin

url => http://localhost:3000/session/new

–Sandip

Sandip

Hi Colin

> @mukund
>
> sounds good...but little tedy task.
>
> @colin
>
> /views/sessions/new.html.erb
> <% form_tag( session_path, :builder => DavesFormBuilder ) do %>
> <p><label for="login">Login</label><br/>
> <%= text_field_tag 'login' %></p>
> <p><label for="password">Password</label><br/>
> <%= password_field_tag 'password' %>
> <%= submit_tag 'login'%>
> <% end %>

Nearly there, and the error is? on which line? with the trace.

Error trace is as follows

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

Extracted source (around line #7):

4: <h2>Sign into System</h2>
5: </div>
6: <div class="data">
7: <% form_tag( session_path, :builder => DavesFormBuilder ) do %>

Can you use :builder with form_tag? I would try it without the
builder and see if that is the problem.

Colin

@colin

I figured out problem. I just comment out erubies in environment.rb and everything working fine.

I am wondering that where erubies got incompatibility in this version.

–Sandip