Running Aptana/Eclipse and InstantRails from a USB Drive

AptanaIf you are using Aptana Studio for Ruby on Rails development, you may have to repeat several boring tasks to get them up and running on a different computer. First, you need to install Ruby, Rails and MySQL. Then, you need to download and install Java, Aptana Studio and Aptana RadRails plugin. Finally you need to configure Aptana for Rails development. In addition, you may need to install some Aptana plugins and Rails gems. If you don't want to go through all these steps, you can just put everything on a USB drive and go. Here is how.

  1. Create a new folder on your USB drive and name it aptana-live, or anything you want
  2. Go to the Aptana Studio download page and download the Windows standalone Zip File, not the Full Installer. It may be called something like Aptana_Studio_Setup_Windows.zip
  3. Unzip Aptana_Studio_Setup_Windows.zip to the /aptana-live folder
  4. Download and install Java
  5. Copy the folder containing Java Runtime files to the folder /aptana-live/java-files. For me, the Java folder was C:\Program Files\Java\jre1.6.0_07
  6. For Aptana to know the Java location, edit the /aptana-live/AptanaStudio.ini file by adding two lines at the top to be something like this:
    -vm
    .\java-files\jre1.6.0_07\bin\javaw
    -name
    Aptana
    Studio
    -vmargs
    -Xmx384M
    -Xms128M
    -Djava.awt.headless=true
  7. To take Ruby, Rails and MySQL with you, just download and unzip InstantRails to the folder /aptana-live/InstantRails
  8. Run Aptana by running /aptana-live/AptanaStudio.exe
  9. To install Aptana RadRails plugin:
    1. From Aptana "Help" menu, select "Software Updates" > "Find and Install..."
    2. Choose "Search for new features to install" and press "Next"
    3. Select "Aptana: RadRails Development Environment" and press "Finish"
    4. Follow the wizard to the end
  10. To configure Aptana:
    1. From Aptana "Window" menu, select "Preferences..."
    2. In the the preferences window, select "Rails" > "Configuration" and fill the paths to rails and mongrel scripts: \InstantRails\ruby\bin\rails and \InstantRails\ruby\bin\mongrel_rails
    3. In the the preferences window, select "Ruby" > "Installed Interpreters". You may find JRuby selected by default. Press "Add" and fill the path to RubyVM home directory: \InstantRails\ruby. Press "OK"
    4. In the the preferences window, select "Ruby" > "Rake" and fill the path to the rake script: \InstantRails\ruby\bin\rake
    5. Press "OK"

Now you can just take your USB drive to any computer with a clean Windows installation and continue developing your Rails applications instantly.

Did you like this article? Bookmark it:

Related Articles

Leave a Comment

If you want to post code, do this:
<pre><code class="ruby|javascript|css|html"> your code here </code></pre>