Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3599392
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:21:43+00:00 2026-05-18T20:21:43+00:00

It is easy to create ruby OS X app — create structure like this:

  • 0

It is easy to create ruby OS X app — create structure like this:

xxx.app
└── Contents
    ├── Info.plist
    ├── MacOS
    │   └── xxx
    └── Resources
        └── xxx.icns

and put code to execute into xxx. But launch time is noticeable, so I want this app to stay in background and run some method, when app is opened: so when I run that app first time, it executes code an stays in background, when I run another time, app is already in background, so it just runs specified method.

Minimal Info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>CFBundlePackageType</key>
  <string>APPL</string>
  <key>CFBundleExecutable</key>
  <string>newTabHere</string>
  <key>CFBundleIconFile</key>
  <string>newTabHere</string>
  <key>LSUIElement</key>
  <true/><!-- hides icon from Dock -->
</dict>
</plist>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:21:44+00:00Added an answer on May 18, 2026 at 8:21 pm

    The slowness is due to the start up time required for the ruby interpreter. That is why it is not slow for a bash script or objective-c.

    Steps to communicate with background ruby program:

    • Make your ruby program use the daemons gem.(optional, but makes running in background easier)
    • Write a bash script to telnet to a port when run.
    • Have your ruby program run eventmachine(avaliable via Rubygems) or another socket server that supports telnet.
    • When the ruby socket server receives the message over telnet have the program run the method you want.
    • Package the bash script in an application like you describe in your question.

    The bash script has to:

    1. Launch the ruby program or start the daemon if it is not already running in the background.
    2. Connect with telnet to localhost on the port specified in the ruby program
    3. Send a message to run the method.
    4. Save or print the result.

    Advantages to this solution

    • Easy to implement.
    • Telnet is automatically installed on all macs.
    • Bash scripts are easy to learn to use.
    • Ruby has good socket gems and libraries that are easy to implement.

    Warning

    This has the cost of constantly using up the computer’s memory with the ruby interpreter. So, it is not a user friendly solution.

    To create a true app with a graphical interface in ruby you have to use macruby with rubycocoa.

    Or use the Titanium Desktop from Appcelerator, you will have to write the interface code in javascript but you can do the rest with ruby. This method also has the advantage of being cross-platform. see http://developer.appcelerator.com/doc/desktop/ruby

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It is easy to create ruby OS X app — create structure like this:
I want to create a login page, it can easy implement using Ruby on
I'm a beginner of Ruby and Rails, so this is probably an easy question.
I am relatively new to ruby on rails, so this question might be easy.
Is there an easy way to create Word documents (.docx) in a Ruby application?
This is driving me farking insane. I'm trying to create a simple beginner app
In JavaFx i can easy create animations, moving pieces etc., but as far as
Is it easy to create GLUT pop-up menus for my OpenGL application? If yes,
Is it easy to create an IPC setup with wxWidgets? I have an application
In EWS Managed API is it easy to create an appointment for a specific

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.