NOTE: The cyber-dojo github repo now uses ruby(2.1.3), Rails(4) and docker(1+).
I don't think these instructions will work anymore.
Instead see setting up your own cyber-dojo docker server
I've been working on building a cyber-dojo VirtualBox Turnkey image that uses rails 3 and ruby 1.9.3 on top of the Turnkey Rails app. I figured the steps involved might be useful for someone so here they are. You can also download them as a shell file here .
First I removed the existing ruby
# cd ~ # apt-get purge ruby-enterpriseThen install libyaml
# cd ~ # wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz # tar xzf yaml-0.1.4.tar.gz # cd yaml-0.1.4 # ./configure # make # make installThen install the version of Ruby I want (this takes quite a while)
# cd ~ # wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz # tar xzf ruby-1.9.3-p125.tar.gz # cd ruby-1.9.3-p125 # ./configure --disable-install-doc # make # make installThen pull the rails3 Cyber-Dojo source (hit return when it asks for a password). I got some utf-ascii conversion warnings which don't seem to matter. When asked if I wanted to overwrite an executable I responded [y]es. This too takes quite a while.
# cd /var/www # git clone https://JonJagger@github.com/JonJagger/cyberdojo # chown -R www-data cyberdojo # chgrp -R www-data cyberdojo # cd cyberdojo # gem update --system # gem update --no-rdoc # gem install bundle --no-ri --no-rdoc # bundle installThen setup apache
# cd /etc/apache2/sites-enabled # sed s/railsapp/cyberdojo/ <railsapp >cyberdojo # rm railsapp # cd /etc/apache2/sites-available # sed s/railsapp/cyberdojo/ <railsapp >cyberdojo # rm railsapp # cd /etc/apache2/conf # sed s/railsapp/cyberdojo/ <railsapp.conf >cyberdojo.conf # rm railsapp.confThen setup passenger (it takes quite a while), and edit /etc/apache2/conf.d/passenger as directed by the output
# cd ~ # apt-get update # apt-get install libcurl4-openssl-dev # cd /var/www/cyberdojo # gem install passenger --no-ri --no-rdoc # passenger-install-apache2-moduleThen
# cd /var/www/cyberdojo # service apache2 restartAnd viola, cyber-dojo was up. Saving to a .ova file creates a 418MB file. This will give you C and C++ (gcc 4.4.5), Perl (5.10.1), Python (2.6.6), Ruby (1.9.3). If you want to upgrade any of these or use any of the other languages you'll need to install their compilers and unit test frameworks.