Problem with form_tag


#1

Hi all!

I’ve seen this problem in several places in the list, but none of the
remedies suggested seem to be helping me much.

I have a view like so:

HELLO
<% form_tag :action => “create” do %>

My pretty form!


<%= text_field “foo”, “bar” %>


<%= submit_tag “Do it!” %>


<% end %>

When the page displays, it only has “HELLO” - the form doesn’t show up
at
all in the outputted HTML.

I’ve done a rails -v and it says I’m running 1.2.2

I looked in my environment.rb file and it showed “RAILS_GEM_VERSION =
'1.1.6
'”

So, I changed it to show 1.2.2, and then I read somewhere that I needed
to
rake rails:update

Did all that and I still just get HELLO without the form.

I just tried the 1.1.6 version like so:

HELLO
<% start_form_tag :action => “create” %>

My pretty form!


<%= text_field “foo”, “bar” %>


<%= submit_tag “Do it!” %>


<% end_form_tag %>

And that spits out a form. Why is the old version working, but the new
version isn’t? Is there some other way to see what version of Rails I’m
really using?

Thanks for any help!


Terry (TAD) Donaghe


#2

When the page displays, it only has “HELLO” - the form doesn’t show up at
Did all that and I still just get HELLO without the form.
And that spits out a form. Why is the old version working, but the new
version isn’t? Is there some other way to see what version of Rails I’m
really using?

Terry,

If you specify RAILS_GEM_VERSION then that is the version of Rails
loaded.
If you don’t specify a version, Rails will look in vendor/ for a
rails/ dir and load that if it exists. Otherwise it’ll load the most
recent version of the rails gem.

Hope this helps,


Zack C.
http://depixelate.com