Topic: Upgrade to rails 1.2.3

Hi There,

I have upgraded to Rails 1.2.3. The upgrade seems to have been successful, however now my apps will not run. I get the following strange errors with radio_button helpers

***** Error *****

2:
3:
4:
5: <%= radio_button :w,:workgroup_id,0 %>Live
6: <%= radio_button :w,:workgroup_id,1 %>Live
7:
8:

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

c:/ruby/rubygems/gems/actionpack-1.13.3/lib/action_view/helpers/form_helper.rb:272:in `value'
c:/ruby/rubygems/gems/actionpack-1.13.3/lib/action_view/helpers/form_helper.rb:272:in `to_radio_button_tag'
c:/ruby/rubygems/gems/actionpack-1.13.3/lib/action_view/helpers/form_helper.rb:224:in `radio_button'
#{RAILS_ROOT}/app/views/test_ajax/test.rhtml:5:in `_run_rhtml_47app47views47test_ajax47test46rhtml'
*****************

***** Code ******

<%= radio_button :w,:workgroup_id,0 %>Live

*****************

Anybody got any ideas?

des

Re: Upgrade to rails 1.2.3

"w" seems kind of an odd name. Is this the name of a model? Do you have an instance variable with the same name? @w

Also, there should be more to the error message. Something at the top of the page stating the error.

Railscasts - Free Ruby on Rails Screencasts

Re: Upgrade to rails 1.2.3

Ryanb,

Its very simple, in the controller I create an instance of the variable @w

and then when I try to create a radio button using the rails helper I get the error message. This is only a test I created it to limit the number of possible problems and have narrowed it down to the radio_button helper. This all works okay with version 1.1.6 of rails.

I am using working on XP with 1.8.6 ruby and 1.2.3 rails. I have check and nobody else seems to be getting this error. I have tried reinstalling but to no avail.

Any ideas???

Des

Re: Upgrade to rails 1.2.3

This is just a guess, but try making the number a string:

<%= radio_button :w, :workgroup_id, "0" %>

Railscasts - Free Ruby on Rails Screencasts

Re: Upgrade to rails 1.2.3

Ryanb,

Tried that, no joy. The problems seems to be deep in the action helper "action_view/helpers/form_helper.rb:272:in `value'"

Here is the error

***** ERROR *****

ArgumentError in Test_ajax#test

Showing app/views/test_ajax/test.rhtml where line #1 raised:

wrong number of arguments (1 for 0)

Extracted source (around line #1):

1: <%= radio_button :w,:id,"0" %>Dead
2: <%= radio_button :w,:id,"1" %>Live
3:
4:

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

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/form_helper.rb:272:in `value'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/form_helper.rb:272:in `to_radio_button_tag'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/form_helper.rb:224:in `radio_button'
#{RAILS_ROOT}/app/views/test_ajax/test.rhtml:1:in `_run_rhtml_47app47views47test_ajax47test46rhtml'
-e:4:in `load'
-e:4

***** END Error *****

The whole thing seems crazy to me. Must be someone else out there with the same problem. Any suggestions guys?

Des