MySQL users, don't miss that one !
1. Get ready
These are the only requirements before you can start the installation process :
- Click here to get the last version of VirtualBox that stands for your host operating system.
- Click here to get the last version of VirtualRails.
You will need the two virtual_rails_1.0.7z.001 and virtual_rails_1.0.7z.002 files, since they are both parts of the same archive.
We recommand you to use a download manager that support stop/resume.Unzip it into the destination folder of your choice using 7zip or a compatible archiver.
2. Install
A. Install and configure VirtualBox
The installation is really simple, you just have to follow the instructions you can find here.
B. Install and configure VirtualRails
-
Run VirtualBox and click the "new" button :

-
Click "next" on the first screen (named "Welcome...") of the creation wizard.
On the second screen, named "VM Name and OS Type", choose "VirtualRails" for the "Name" Field, and select "Linux" for the Operating System. "Ubuntu" is then automatically selected.

Click "Next".
-
On the screen named "Memory", we highly recommand you to set the cursor on "1024MB" if your computer has at least 2Gb of physical memory. Otherwise just let the default setting.

Then click "Next".
-
On the screen named "Virtual Hard Disk", select the "Use existing hard disk" :

Click on the folder icon with the green arrow on the right of the screen.
On the opened pop-up named "Virtual Media Manager", click on the "Add" button :

Then navigate to the "virtual_rails_1.0.vdi" file you've precedently downloaded, select it and click on the "Open" button.
Now the "Virtual Media Manager" should look like this :

Click the "Select" button à the bottom of this popup to close it.
Now you're back to the "Virtual Hard Disk" screen with these settings :

Click "Next".
-
The "Summary" screen of the virtual machine creation wizard should show something like that :

Click the "Finish" button.
Your VirtualRails Machine is installed and ready to run :
C. Optional configuration steps
You can adjust some settings for better performances of the virtual machine :
-
Click the "Settings" button :

-
In the opened pop-up named "VirtualRails - Settings", select the "Display" menu on the left, and then set the "Video Memory" parameter to "128" if your video card supports it.
NB : If you're running virtualbox on MacOS, we recommand you to leave unchecked the "Enable 3D acceleration" and "Enable 2D video acceleration" options.

-
Select the "Audio" menu on the left, and the uncheck the "Enable Audio" option :

- Click the "OK" button to finish.
3. Run
-
Run VirtualBox. Once it is loaded, select the "VirtualRails" machine on the left menu and click the "Start" button :


Nb:VirtualRails opens automatically a session for the "virtualrails" user. VirtualRails is now up and running, ready to use !
See the following parts of this documentation to learn how to use VirtualRails properly.
4. Use
-
Generic
VirtualRails is nothing more (but nothing less) than a linux distribution pre-configured to developp Ruby On Rails applications,
and running in a virtual container.
You can do everything you would/could do in a standard ubuntu platform, including installing or uninstalling softwares.
-
Linux
VirtualRails comes with a predefined user, named "virtualrails" (password = "virtualrails"), that is dedicated to the day after day work.
Knowing that, You'll certainly want to run sudo commands or eventually open a root session.
The default root password for VirtualRails is "virtualrails" (yes, very creative indeed ^^)
Since it's a real linux distrib, you can change this password or manage the users as you want at any time,
juste like on any other ubuntu platform.
-
Network
VirtualRails use the VirtualBox network gate to access Internet through your real connection.
That means you can browse websites, download files or OS updates, work with distant code repositories, tchat, and so on...
This feature normally works out of the box like a charm, you have nothing more to do than the precedently described installation steps.
We've heard of some users having problems with the VirtualBox virtual network card on Windows Vista.
If you're in this case, it seems that desactivating this virtual card in the windows network settings fix the
problem and still let you acces Internet form VirtualRails
-
Ruby
VirtualRails use the Bitnami Rubystack.
RubyStack is a pre-build Ruby Package that comes with Ruby 1.8.7 (default) and 1.9, MySQL 5, Apache 2, PhP and phpMyAdmin.
It is located in the "/opt/rubystack-2.0-0/" folder.
RubyGem and all the paths to work with Rubystack are already configured in VirtualRails, so you can directly use the "gem" command to manage your Ruby libs.
For more informations about Rubystack, you can read the docs in the "/opt/rubystack-2.0-0/" folder or go to their website
-
MySQL
VirtualRails use the Rubystack version of MySQL.
Since it doesn't starts automatically on startup, you will have to do it manually :
Open a terminal, navigate to the "/opt/rubystack-2.0-0" folder, and run "sudo ./ctlscript.sh start".
It will start MySQL and Apache, so you can use phpMyAdmin to managed your databases.
Once it is started, phpMyAdmin is accessible at "http://127.0.0.1:8080/phpmyadmin/". (user = "administrator" and password = "virtualrails")
The password for the MySQL root user in VirtualRails is "virtualrails"
-
NetBeans
The main coding tool in VirtualRails is Netbeans 6.8 in its Ruby-packaged version.
It is our choice of heart since it's a free and powerfull complete Ruby On Rails developpment tool, but feel free to install and use your favorite editor or IDE.If you want to use NetBeans, the VirtualRails version is already configured to :
- Use the Rubystack Ruby libs, or the build-in JRuby version
- Manage Rails 2.3.4 projects
- Handle your migrations
- Manage Mongrel
- Run Rake tasks
- Integrate with Subversion (1.5)
- And many more...Please see the netbeans documentation for more informations.
-
Others
VirtualRails comme with many more tools and softwares already installed and configured.
Please see this page for the complete list of features.
5. Good to know
-
VitualBox Guest Additions
The VirtualBox "guest additions" are installed and configured in VirtualRails.
That means you can :
- Resize your VirtualRails window, the resolution will be recalculated on-the-fly
- Use your mouse IN and OUT of VirtualRails automatically, without using the VirtualBox Host Key
You can work with VirtualRails in Fullscreen mode by pressing your VirtualBox Host Key (right CTRL by default) + F at the same time.
Use the same key to siwth-back to windowed mode.
In fullscreen mode, you can pop a small menu by pointing the bottom center of your screen with your mouse. This panel alows you to manage the VirtualBox fullscreen mode.
Nb : While you're in fullscreen mode, all of your other "native" applications are still executing in the background, waiting to get the focus back.
-
MySQL temporary socket file
Since VirtualRails use the Rubystack MySQL version, you'll have to add the following line in the config/database.yml of your Rails project (for each developpement, production or test block) :
"socket: /opt/rubystack-2.0-0/mysql/tmp/mysql.sock"

Développeurs Français, nous recrutons !