You are here

Ruby Portable (and how to do it manualy)

5 posts / 0 new
Last post
t-unit
t-unit's picture
Offline
Last seen: 13 years 7 months ago
Joined: 2010-01-01 15:44
Ruby Portable (and how to do it manualy)

I would love to see Ruby (Language made portable)
Though it is possible it isn't very practical.

Ruby is an open-source coding language.

I would only like to see a portable version of the basic materials to run it in the Command Prompt Portable application.
In other words I would love to see the process below automated. With the exception of Notepad++ being optional.
The portable package shouldn't be installed in the "portable apps" folder to avoid conflicts. Perhaps an executable message to point the person to an explanation on how to use the ruby program. NOT HOW TO USE THE LANGUAGE!

To run Ruby portably you need three things...
1. Command Prompt Portable - To execute ruby code
2. Notepad++ Portable - to write the code
3. Ruby Windows installation - the ruby language
Note... Links to helpful websites are provided.

Step One.
Download and install Command Prompt Portable and Notepad++ Portable

Step Two.
In the root directory of the drive create a folder called "UtilsDirectory"

Step Three.
Install Ruby Windows Installation inside the the UtilsDirectory Folder.

Step Four.
Delete the ruby entry from inside the start menu.

Step Five.
Go into the root directory of the drive and navigate to the portable apps folder and the to the Command Prompt Portable folder and then to the data folder. Open the Batch file with the normal windows text editor and add this line.

SET PATH=%~d0\UtilsDirectory\Ruby\bin;%PATH%

Save and close the windows.

Step Six.
Open Notepad++ and type:

puts 'Hello World!'
puts 'Good Bye World!'

Save it in the UtilsDirectory folder as hello-world.rb

Step Seven.
Open Command Prompt Portable and type:

cd /UtilsDirectory/ and press enter
ruby hello-world.rb and press enter

if you see the following then you have confiqured Ruby for portable use.

Hello World!
Good Bye World!

Thank you.

P.S. There is a great tutorial on programming with Ruby here:
http://pine.fm/LearnToProgram/
This link can be found at the Ruby home page as well.
http://www.ruby-lang.org/

dinosoep
Offline
Last seen: 12 years 9 months ago
Joined: 2009-12-14 15:12
http://jruby.org/ install a

http://jruby.org/
install a jdk, and start writing ruby code.
with the program jruby offers it gets compiled to a .class file you can run on every computer with the jvm portable???

t-unit
t-unit's picture
Offline
Last seen: 13 years 7 months ago
Joined: 2010-01-01 15:44
I am not sure about JRUBY

I would recommend that If you want to run ruby portably you follow my instructions listed above but be open to different products. I am not sure about JRUBY. Anyway I look into creating a portable ruby package.

SanDisk Cruzer 4G
PNY Micro Swivel Attache 4G With Portableapps 2.0 Beta 3
Robot Penquins... Genius

t-unit
t-unit's picture
Offline
Last seen: 13 years 7 months ago
Joined: 2010-01-01 15:44
I have generated a Portable Ruby Installer!

I have generated a portable ruby installer, but it is very rubimentary right now and I haven't proven Its workability. I am facing on small problem. How to make it recognize the portable apps drive and automatically select it for the destination.
I am sure I am missing something.

Update:
________________________________

I have repackaged Command Prompt Portable with ruby built into it.

SanDisk Cruzer 4G
PNY Micro Swivel Attache 4G With Portableapps 2.0 Beta 3
Robot Penquins... Genius

MongolJohn
Offline
Last seen: 1 month 3 weeks ago
Joined: 2014-10-30 11:03
Any updates?

This work was done almost five years ago, and your last post said it was still a work in progress. Have you made any progress? Do you now have it in a "final" form? Just this week I started looking into portable Ruby setups, so I'm very interested in your work.

Thanks.

Log in or register to post comments