# Can't convert nil into string

**URL:** <https://www.ruby-forum.com/t/cant-convert-nil-into-string/71310>\
**Category:** Rails\
**Created:** [October 6, 2006, 8:37pm UTC](https://www.ruby-forum.com/t/cant-convert-nil-into-string/71310 "2006-10-06T20:37:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsn1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ea924/32.png) [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Post date:** [October 6, 2006, 8:37pm UTC](https://www.ruby-forum.com/t/cant-convert-nil-into-string/71310/1 "2006-10-06T20:37:00Z")

</div>

Hi all  
I am gettng an error message:

can’t convert nil into string

here is my controller:

> class GreetController \< ApplicationController  
> def say\_hi  
> @message= "Hello " + params[:textName]  
> end  
> end
> 
> and my viewer
> 
> Hello!!! \<%= start\_form\_tag :controller=\>'greet', :action=\>'say\_hi' %\> 
> 
> Enter Your N.: \<%= text\_field\_tag :textName, :size=\> 20 %\>
> 
> \<%= @message %\>
> 
> \<%= submit\_tag( "Hello") %\>
> 
> \<%= end\_form\_tag %\>

It works when I delete the “+ params[:textName]” in the controller. It  
looks like it does not recognize the textbox.

How can I fix that?  
thanks
