I have been making an app using Ruby Shoes. I am happy with how it turned out and would like to share it with some friends. However, the GUI packager doesn't work in OSX and the Windows packager only seems to make a .shy file. I've been reading around looking for solutions and I don't understand any of them. Can someone clearly explain step-by-step how to package a Ruby Shoes app to say a DMG or an EXE file?
Personally, I prefer to use green_shoes. Green_shoes is a pure ruby gem that you require in your ruby code instead of a program that packages your ruby code. This way, you can use a program such as ocra to make your ruby file into exe. While it is sort of a hack, I feel that it is better than requiring your users to install shoes to run your program.
Check this out.
Compiling/Package a Shoes.app to a standalone Mac.app?
[How?] "By compiling your app and Shoes together. This is what I do with Hackety Hack. Totally works."
Related
I wrote an application using ruby and I want to create an installer for that. I'm using Linux as OS.
I know there's the ruby script setup.rb written by Minero Aoki, but It's a bit harsh to understand by reading the source code and I'd like to write my own setup.rb. This is my final objective.
This is the first time that I try to write an installer and I don't know how to start. I carried out some research on Google but I can't find what I'm really looking for.
Can anyone suggest me any books or manual where I can learn to put the files on the right place (or whatever the installers do on Linux OS)? To put it better I would like to learn the basics of "how to install source code" in Linux systems and then apply the theory to try to install my ruby scripts.
Any suggestion is accepted.
Why don't you write a gem for it ? This is the best packaging system we know for ruby and you can just distribute a .gem file that can be installed with a simple gem command.
Check http://guides.rubygems.org/make-your-own-gem
I am in need of a GUI toolkit that goes a little further than tk does, but my school's computers do not allow programs to run if they try to create/alter files on the local disk. Because of that, I need a portable GUI toolkit for Windows. Does anybody know of one?
Green Shoes, just install the gem, copy it along with your Ruby map to a stick and you are off to go.
gem install green_shoes
http://ashbb.github.com/green_shoes/App.html
a simple sample
require 'green_shoes'
Shoes.app{
e = edit_line
button("Click me!"){alert("You entered #{e.text}")}
}
Qt4 and ruby-qt (the qtbindings gem works beautifully to get the ruby bindings)
For graphical applications in Ruby, I personally prefer JRuby + Swing. Presumably your school's computers have a JRE installed... perhaps you can run JRuby from your flash drive?
I see you haven't yet accepted an answer, so i try another suggestion.
Again, you only need a Gem, Watir in this case.
Your browser is the GUI.
Here a question i asked and the answer i accepted
http://stackoverflow.com/questions/11724201/use-browser-as-gui-in-ruby
That example uses IE but the other browsers are possible too, this solution is cross-browser and cross OS
I'm looking for a straightforward way to deploy a standalone Ruby-Tk desktop app on OS X. All existing options for deploying desktop Ruby GUI apps on the Mac (e.g. standaloneify.rb) assume that you are using RubyCocoa or MacRuby, and are tightly bound to Xcode/Interface Builder project structure; or, alternatively, that you are wrapping a simple script via Platypus that does not involve deploying the entire Ruby runtime. None of the other existing options that I've found--rubyscript2exe, ocra, crate--support the Mac and/or support Ruby 1.9.
I'm hoping that someone can point me to a shell script or Ruby script that does the following:
Tracks all dependencies/gems in an app.
Copies the Ruby interpreter and dependencies into an application bundle.
Runs install_name_tool on the Ruby interpreter and all dylibs to make them portable.
The application bundle can either be something created by Platypus, use a Cocoa stub launcher, or even a shell script--I know how to handle those. The problem I'm having is getting the Ruby runtime wrapped in a portable way.
There's a rakefile at http://weft-qda.rubyforge.org/svn/trunk/weft-qda/rake/rake_osx.rb that encompasses the tasks that I'm looking to achieve, but this rakefile is part of a larger build structure that I can't get running on my Mac. I'm not familiar enough with rakefile structure to refactor this into a simple script that I can run, either via "ruby rake_osx.rb" or even "rake".
If someone can suggest to me how to modify this rakefile to run independently, or point me to another example project, or even share some code, I would be grateful. The project I am working on is better suited for Ruby than Python (better library support in Ruby), but I am not going to invest time in it if deployment won't work. (Python has a much richer tradition of deployment tools than Ruby, something I'v never quite understood.)
This is a bit late after the fact, but in classic fashion, since I could not find a desktop app deployment tool for Ruby-Tk on the Mac, I wrote my own:
ruby2app
ruby2app is a simple command-line tool, inspired by similar Mac tools like py2app for Python, that bundles a Ruby script with the Ruby runtime into a standalone Mac application. It reads a basic configuration file to find the appropriate Ruby installation, compiles a small C program that embeds the Ruby interpreter, copies the entire Ruby installation into the application bundle, and re-links the relevant libraries with the main executable.
It attempts to provide for the Mac what ocra and exerb provide for Windows. Hopefully this will be of use to others.
I can't seem to get the Ruby Shoes packager to correctly create an exe with Shoes included. I'm using the Raisins release (0.r1134), with the pack.rb replaced from github. The exe's the packager makes are all 70-80K files (they obviously don't include shoes or ruby). These exe's will run on my XP machine that already has Shoes on it. but when I copy them to another laptop they start a "Shoes is downloading" dialog that does nothing and then goes away.
I need to make standalone Windows exe's, and my understanding was that the "Yes, I want Shoes included" option in the packager would do that. Did I misunderstand the intent? Is there a way to make this work? Hope so, because I love Shoes. As most women do. Hmm... maybe Shoes was _why's attempt at getting more women into programming as well as kids...but I digress.
The other threads I've found here imply this will work:
Problem in Ruby Shoes packaging?
Shoes packager problem
Although the pack.rb file now references the new website, shoes.heroku.com, it seems as if the files have fallen off it. So it won't be generating a proper .exe. Whoops.
You can work around this by placing the Shoes Raisins installer, if you have it, in the LIB_DIR and renaming it. E.g. this works for me:
D:\Users\me\.shoes\raisins\win32\latest_shoes-novideo.exe
pack.rb will check here before trying to download.
Note that you might still have issues with the executable working. Personally I've found distributing a .shy more reliable.
Some work needs to be done on packaging (I am involved with Shoes).
I have only installed Ruby1.9 on my machine. Have some kind of problems with the programs I am trying to write using Shoes. Am wondering if this is a version issue.
I am trying to do some stuff over ssl.
Shoes comes with its own Ruby version embedded in the script you download. It is completely self-contained as far as I can tell.
I'm don't know what is "Shoes" but i found this:
https://launchpad.net/ubuntu/+source/shoes
according to that "shoes (0.r396-5)" Depend on "rubygems1.8"