On Ubuntu does Shoes require Ruby1.8 or Ruby1.9? - ruby

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"

Related

Can't require 'osx/cocoa' after RubyCocoa installation

I've tried moving files around and performing various un/installations and still cannot seem to get RubyCocoa to load when I do require 'osx/cocoa'. I even found the native apple version of RubyCocoa and those files won't load either. I've hit a dead end trying to determine how I can get it to work and was really hoping someone could help. I'm interested in testing its functionality and possibly writing some applescripts, using Ruby, but until I overcome this issue I'm completely stuck. Thanks!
Extra points if you can figure out how I can install RubyCocoa with RVM.
In Mac OS X Maverics, OS-embedded Ruby 1.8 (/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby) is required to use require osx/cocoa. Specify the path instead of using other versions of Ruby that are installed with rbenv or rvm.
Please note that this solution is temporal because the version of Ruby 1.8 has been removed in Yosemite and require osx/cocoa is unavailable.
I'm late to the game but this gist will help https://gist.github.com/nsforge/6861400.

How to package ruby shoes apps on OSX 10.7

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."

How can I create debian package (*.deb) from ruby application written with qt4?

I found a lot of tutorials how to build application with Ruby and Qt, but i have no idea how anybody else will be able to run it! I am using Ubuntu 11.10, ruby 1.9.2 with rvm and:
rbqtapi -v output "QtRuby 2.0.5 using Qt-4.7.4"
P.S. I have no idea how to build *.deb, it will be my first desktop app, not web.
please have a look on http://shoesrb.com/ this is the best way I heard off for writing GUI apps.
Shoes has now not it's greatest time, but we put our best time to make it better, give it a try and someone will help you.
In case you are in need of assistance just ask as question on #shoes IRC channel on freenode servers.
If you're sold on QT, then you will need your users to install all the support libraries for QT (and anything else), then you can upload a rubygem to rubygems.org for your users to download.
Once, they've installed the support libraries, you'd only need to update your rubygem, which is fairly quick and easy for updates.
You may also wan to look at visualruby. It uses GTK. Then you'd install the GTK libraries instead of the QT ones.
http://www.visualruby.net
As far as .deb packages go, I tried to research the same thing with little success. The rubygems packaging system is designed to distribute ruby programs, so it is the best way to go. Also, you'll need to install different support libraries for different platforms. If you look at visualruby's install page, you can see how to install GTK for Linux and Windows.
Good Luck.

Can I switch versions of Ruby dynamically using RVM?

I'm working on building a GUI for my checkers implementation. I'm utilizing a GUI framework that only works with Ruby 1.8, yet my game engine, which I have packaged as a gem, only works with Ruby 1.9.
I can't change the code for the GUI framework and reworking my game engine to make it compatible with 1.8 is undesirable, to say the least.
I'm using RVM though, and it looks like you can write RVM scripts to change Ruby versions on the fly.
Does anyone have any experience with that or what the script might look like?
You could run it in two processes. Give the GUI a 1.8 process and talk to it via a shared db or an API on the other side. That's how I'd do it. The good part about that is you can have on online version of your game as well because other clients will be able to talk to it as well.
You can't run one app with two versions of Ruby. How do you imagine this?
RVM has an ability to automatically change current ruby when you cd into a directory. Just create in that directory a file called .rvmrc with content like
rvm use 1.8.7

query regarding Ruby

I am a fresher as far as Ruby is concerned. i worked in PHP for sometime. I was wondering if there is some pakage like LAMP or WAMP as in case of PHP for Ruby too......
If not at least suggest me the best setup or IDE for Ruby
Thanx in advance
There is something like: rubystack, if this is what you are looking for (rails development).
BitNami RubyStack greatly simplifies the development and deployment of Ruby on Rails applications. It includes ready-to-run versions of Apache, MySQL, Ruby and Rails and required dependencies. It can be deployed using a native installer, as a virtual machine or in the cloud.
Netbeans, an IDE coming from the java world has ruby support: http://wiki.netbeans.org/Ruby.
Windows
If you use Windows, the easiest way to get Ruby working is via the RubyInstaller.
If you only want to work on Ruby, Ruby 1.9.1 is your choice. Otherwise, if you want to experiment with Rails, you should try to install Ruby 1.8.7.
There's also a BitNami Ruby stack but it contains much more stuff than Ruby itself. You don't really need Apache or MySQL to work with Ruby on your local machine because you can use Mongrel and SQLite. In this way, you don't have to bother with additional background processes.
Avoid using Ruby 1.8.6. It's old and it's not convenient to start studying with an outdated Ruby version.
Mac OS X
Ruby comes installed by default with Leopard and Show Leopard. If you want a different Ruby version, I suggest to use RVM.
Linux
You can install Ruby by source or with your system package manager.
The Rails framework is a great setup for doing web development, and I would highly recommend RadRails as your IDE or it's base, Aptana.

Resources