Tinker's thoughts~

About Blog GitHub

28 Feb 2014
Running Shoes apps in Mac OS X

This is one of the mini-posts -kind of like a development note that would be useful for shoes starters. First, shoes is a GUI framework for ruby. It allows us to write GUI apps quickly in ruby.

Example of a GUI app

app.rb
Shoes.app do
def answer(v)
@answer.replace v.inspect
end
@list = stack do
button "Copy" do
answer "BBBB"
end
end
@answer = para "Answers appear here"
end

Running a shoes app

This is the tricky bit. You have to download Shoes from their website and install it your mac. Include the below code in your .bashrc or .zshrc file (If you have zsh installed).

alias shoes='/Applications/Shoes.app/Contents/MacOS/shoes '

Now you can simply do shoes app.rb and it will run the shoes app.


Till next time mate,
Dulitha at 00:00

About Blog GitHub