Anvil: GUI development Framework in Ruby

14 Jan 2008

Recently i have done a small experimentation on Anvil - A ruby framework to create GUI based applications.The back bone of Anvil is WxRuby. At a glance i thought it will be very easy, so decided to to give a try :)

sudo apt-get install anvil

This installs anvil and all the other required gems. Then running the command

anvil my_editor

Creates a project my_editor. Anvil follows MVC architecture. Browsing through the new project's folder structure, we can see folders and files for inserting our Models, Views and controllers.

cd my_editor anvil

A window pops up..! Now we just need to add GUI components as we require, in the respective views and controllers.

I was very excited to see the ease with which i could build an GUI application with Anvil but i couldn't finish by the end of the day as i had wished. I was getting some errors while using "button" method. It was saying NoMethod error :(. But couldn't find any error that time & tried a lot then i came to know that the WxRuby that got installed was the latest version and in documentation of Anvil was with an older version. Then i tried with "evt_button" of the new version and it worked.

I found Anvil and WxRuby very useful in building GUI applications.