Okay I figured it out, in case anyone else needs help like me I will show you my source code. The button is the image of dirt. Use it as a template if you want
Here is a link to the source code
http://pastie.org/3417854 - main.rb
http://pastie.org/3417857 - tileclasses.rb