# Problem with form\_tag

**URL:** <https://www.ruby-forum.com/t/problem-with-form-tag/92583>\
**Category:** Rails\
**Created:** [April 21, 2007, 1:19am UTC](https://www.ruby-forum.com/t/problem-with-form-tag/92583 "2007-04-21T01:19:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Terry\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/cc9497/32.png) [@Terry\_D](https://www.ruby-forum.com/u/Terry_D)\
**Post date:** [April 21, 2007, 1:19am UTC](https://www.ruby-forum.com/t/problem-with-form-tag/92583/1 "2007-04-21T01:19:17Z")

</div>

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  
[http://tadspot.tumblr.com](http://tadspot.tumblr.com)

---

<div class="post-metadata">

**Author:** ![Terry\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/cc9497/32.png) [@Terry\_D](https://www.ruby-forum.com/u/Terry_D)\
**Post date:** [April 21, 2007, 3:30am UTC](https://www.ruby-forum.com/t/problem-with-form-tag/92583/2 "2007-04-21T03:30:23Z")

</div>

> 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](http://depixelate.com)
