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

  • SEARCH
  • Home
  • 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 8379705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:15:45+00:00 2026-06-09T16:15:45+00:00

I need to package Ruby application (a batch job), and distribute to other users.

  • 0

I need to package Ruby application (a batch job), and distribute to other users. Ideally I don’t need user to setup Ruby, and the package shall contain all the dependencies in it.

Is there easy way to do this? I am using Ruby v1.9.3.

  • 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-06-09T16:15:46+00:00Added an answer on June 9, 2026 at 4:15 pm

    Your not clear in your question, so I’ll assume the following are true:

    • You and your users are on Windows
    • This is a short script with few dependencies

    Given that, your best bet is probably the ‘ocra’ gem. With it you can package your script into an .exe using ocra <script>.rb. That will bundle your Ruby runtime, any gems your script uses, and your source into a <script>.exe file, like so:

        C:\Users\Walton>cat hello.rb
        puts 'Hello World!'
    
        C:\Users\Walton>ocra hello.rb
        === Loading script to check dependencies
        Hello World!
        C:/Ruby193/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:467: Use RbConfig instead of obsolete and deprecated Config.
        === Including 52 encoding support files (5179608 bytes, use --no-enc to exclude)
    
        === Building hello.exe
        === Adding user-supplied source files
        === Adding ruby executable ruby.exe
        === Adding library files
        === Compressing 14898286 bytes
        === Finished building hello.exe (3261400 bytes)
    
        C:\Users\Walton>hello.exe
        Hello World!
    

    Since it packages your existing ruby runtime, you should probably be running a 32-bit Ruby to ensure that your executable can run on both 32 and 64-bit platforms.

    If you need something more than ocra can provide, your best bet is going to be to build an installer that packages Ruby and your application.

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

Sidebar

Related Questions

In chef I need to do easy_install -U package. easy_install_package distribute do action :install
I'm trying to package my ruby application as a RubyGem (using Jeweler and Rake).
when working with Ruby in Ubuntu, I need to install libopenssl-ruby package. I would
I'm building an R package and need to build a jni library for OSX
I'm currently working on a NuGet package which need to configure a couple of
I need to use python-rest-client package into my project. I tried several times for
I need to call a number of different procedures within an Oracle package successively
I'm working on a LaTeX package which might need to do some things differently
I need help understanding how to demonize a process in Go. package main import
I need to write, or find, a script to create a Debian package, using

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.