Create a MacOS desktop application with pure Ruby (Tutorial)
Joseph Schito
Posted on April 10, 2024
This is (for now) a modest step-by-step tutorial about creating a MacOS desktop application with Ruby.
I used Traveling Ruby and Platypus, so it doesn't need any system dependencies to run because it downloads Ruby executables and installs gems in the application bundle.
(I'll try to make it more detailed and add more features in the future).
Tested on Apple M3
1
You have your Ruby application inside a example
folder
2
Create a ruby2pack.rb
file outside example
and fill it with this gist https://gist.github.com/josephschito/96c0e385cb803f3778fb4c40226e64f5
3
From IRB require that file with require ./ruby2pack
and run Ruby2Pack.new(source_path: 'example', ruby_version: '3.3.0', platform: 'osx-arm64', rel: '20240215').run
.
Test your application execution by running ./dist/osx-arm64-3.3.0-20240215/run
4
Download Platypus from https://github.com/sveinbjornt/Platypus/releases
and run it
5
Follow the image instructions and then press [Create App]
THE END
That's it! 🎉
Posted on April 10, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.