Getting to "Hello World!" in RubyMotion

Posted by John Maddux Published on June 03, 2014

FYI: You will need to purchase RubyMotion from RubyMotion.com. It is a paid product.

Setup:
1. If you haven’t done so already, setup your normal Ruby development environment setup. Instructions are here if you need them: http://jemaddux.com/post/87499556472/setting-up-your-ruby-environment-on-mac

2. Download and run the executable from rubymotion.com.

Simple setup. Right?

Creating a Hello World App:

From your terminal run these commands to generate your app open up the code.
motion create HelloWorld
cd HelloWorld/
subl .


Under the app folder you will find app_delegate.rb which is the starting point of your application.

Change the application method to look like this:

Go back to your terminal and type ‘rake’ to run the app in the simulator.

You should see something like this:

image

You are done!