16 Mar 2012, 14:43
Q782517742_3697_pragsmall

Kosmas Chatzimichalis (4 posts)

Hi,

As I had some problems with the lucid64 VM, and my targer server uses lenny 32, I’ve tried an alternative package creation using lenny 32, rvm and ruby 1.9.3.

The steps are below and here (http://www.42.mach7x.com/2012/03/16/creating-a-...)

s an addition to the excellent beta book ‘Deploying Rails’, as I had problems using the suggested lucid64 image, I’ve tried to install a debian lenny 32 image with rvm and Ruby 1.9.3.

The steps needed are listed below

  • Download the lenny package:
vagrant box add debian-lenny-32 https://s3-eu-west-1.amazonaws.com/glassesdirec...
  • Make a new directory for the virtual box:

    $ mkdir -p ~/deployingrails/lenny32

  • change into created directory and create the Vagrant file:

    cd ~/deployingrails/lenny32 vagrant init

  • change the Vagrant file to use the virtual box we have downloaded:

    Vagrant::Config.run do |config| config.vm.box = “lenny32” end

  • Start the VM:

    vagrant up

  • If there is a warning about the Guest additions here install the latest guest additions by following the description here http://www.virtualbox.org/manual/ch04.html, but only use the update and upgrade steps as:

    sudo apt-get update sudo apt-get upgrade

  • After finishing the upgrade logout (exit) from the VM and issue the command to restart the VM: vagrant reload
  • login to the VM again:

    vagrant ssh

    • Install curl to be able to download the installation script for:

      sudo apt-get install curl

  • Download and install rvm by using the script described here http://beginrescueend.com/rvm/install/ :

    $ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

  • Add the following to ~/.bashrc:

    user$ echo ‘[[ -s ”$HOME/.rvm/scripts/rvm” ]] && . ”$HOME/.rvm/scripts/rvm” # Load RVM function’ >> ~/.bashrc

  • Reload the bashrc file:

    source ~/.bashrc

  • Make sure that the rvm is loaded as function:

    vagrant$ type rvm | head -1 rvm is a function

  • Run the rvm requirement to see the needed libraries and then run the suggested ones (except libreadline6 and libreadline6-dev that are not there in debian):

    sudo apt-get install build-essential openssl curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison

  • Install Ruby 1.9.3 :

    rvm install ruby-1.9.3

  • Use the ruby 1.9.3 as default:

    rvm use 1.9.3—default

  • Finally create a new VM package to use in future:

    vagrant package—output lenny32-rvm-ruby193

  You must be logged in to comment