Wednesday, May 7, 2008

Ruby + Rails + Debian

I tried a million different tutorials, and they all sucked, then my friend showed me the way.

  1. comment or delete the lines currently in /etc/apt/sources.list
  2. add the follow lines to /etc/apt/sources.list
    deb http://ftp.debian.org/debian/ etch main

    deb-src http://ftp.debian.org/debian/ etch main

    deb http://security.debian.org/ etch/updates main contrib

    deb-src http://security.debian.org/ etch/updates main contrib

    deb http://ftp.debian.org/debian/ testing main

    deb-src http://ftp.debian.org/debian/ testing main

    deb http://security.debian.org/ testing/updates main contrib

    deb-src http://security.debian.org/ testing/updates main contrib

  3. Run the follow command:
    apt-get update

  4. /etc/apt/apt.conf should contain:
    APT::Default-Release "stable";
    APT::Cache-Limit "16777216";

  5. run:
    apt-get -t testing install ruby1.8
    apt-get -t testing install ruby1.8-dev
    apt-get -t testing install ri1.8
    apt-get -t testing install rubygems
    ln -s /usr/bin/ruby1.8 /usr/bin/ruby
    ln -s /usr/bin/ri1.8 /usr/bin/ri

  6. install all the gems you want and use them!

All DONE!

1 comment:

Tom said...

I had to install the package libopenssl-ruby1.8 through aptitude (apt-get) as well.