rod mclaughlin


How to install Rails on the EEEPC subnotebook (17 dec 08)

I had an Asus eeepc 4Gb Surf subnotebook.

Installing Ruby on Rails was a bit of a wild goose chase, so I documented it here:

http://forum.eeeuser.com/viewtopic.php?pid=257583#p257583

then I got an upgrade - an eeepc 1000 16 Gb - and it was even harder.

 

Start here:
http://wiki.eeeuser.com/addingxandrosrepos
and here:
http://www.ruby-forum.com/topic/161926
and most of all, here:
http://markmail.org/message/fiw7dupsgejaqvui

This is what I did - your mileage may vary (and hopefully, be shorter):
Run Terminal from File Manager - Show All File Systems -
double click on /bin/bash

sudo apt-get install libc6
answer various questions in the affirmative

sudo apt-get update
sudo apt-get install gcc
sudo aptitude update
sudo aptitude install build-essential

Get ruby from ruby-lang.org
eg.
ftp://ftp.ruby-lang.org/pub/ruby/1.8/ru … p72.tar.gz
tar xvfz ruby....tar.gz

sudo apt-get install rdoc

Download
http://rubyforge.org/frs/download.php/4 … ms-xxx.tgz
tar xvfz rubygems-xxx.tgz
cd rubygems-xxx
sudo ruby setup.rb

sudo apt-get install openssl

Download
http://ftp.hu.debian.org/debian-non-US/ … rig.tar.gz

Download
http://www.zlib.net/zlib-1.2.3.tar.gz
tar xvfz zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
make
make install

cd ..
Then get ruby-zib from
http://raa.ruby-lang.org/project/ruby-zlib
and install it
tar xvfz ruby-zlib-xxx.tgz
cd ruby-zlib-xxx
ruby extconf.rb
make
sudo make install

cd ..
sudo apt-get update
sudo apt-get upgrade
sudo apt-get upgrade --fix-missing
   (why the $%# doesn't it fix missing anyhow ;)

sudo apt-get install libssl-dev

Get
http://mekensleep.org/cygwin/cygwin-200 … -1.tar.bz2
NOT
openssl-devel-0.9.8-1.tar.gz
as you might expect, then
tar jxvf openssl-devel-0.9.8-1.tar.bz2
This will create folder usr
You need to copy its contents into /usr
(sudo cp -R usr/* /usr)

cd ssl-0.3.3
sudo ruby extconf.rb

This gave errors, so I tried updating the EEEPC software by clicking the updates button on the toolbar...
Choose all updates...
Restart computer...

This had the effect of uninstalling openssl-dev, so I didn't have
ssl.h any more!

I had to

tar jxvf openssl-devel-0.9.8-1.tar.bz2
sudo cp -R usr/* /usr
again!

Then I tried following my own instructions on the eeepc user forum for the
/ect/apt/sources.list file - it now looks like:

deb http://update.eeepc.asus.com/p701 p701 main
deb http://update.eeepc.asus.com/p701/en p701 main
deb http://xnv4.xandros.com/xs2.0/upkg-srv2 etch main contrib non-free
deb http://dccamirror.xandros.com/dccri/ dccri-3.0 main
deb http://www.geekconnection.org/ xandros4 main
deb http://download.tuxfamily.org/eeepcrepos/ p701 main etch
deb http://us.archive.ubuntu.com/ubuntu dapper universe
deb-src http://us.archive.ubuntu.com/ubuntu dapper universe

 

and file /etc/apt/preferences looks like:

Package: *
Pin: origin update.eeepc.asus.com
Pin-Priority: 950

Package: *
Pin: origin updates.xepc.org
Pin-Priority: 935

Package: *
Pin: origin
Pin-Priority: 925

Package: *
Pin: origin xnv4.xandros.com
Pin-Priority: 900

Package: *
Pin: origin dccamirror.xandros.com
Pin-Priority: 850

Package: *
Pin: origin www.geekconnection.org
Pin-Priority: 750

Package: *
Pin: release a=stable
Pin-Priority: 700

Package: *
Pin: release a=testing
Pin-Priority: 650

Package: *
Pin: release a=unstable
Pin-Priority: 600


then...

sudo apt-get install libxml-ruby libxslt-ruby libxml2 libxslt1-dev

sudo aptitude install openssl-ruby
sudo apt-get install libopenssl-ruby
sudo apt-get install ruby1.8-dev
sudo aptitude install libopenssl-ruby1.8
sudo apt-get  install yum
sudo apt-get install sqlite
sudo apt-get install freeciv-client-gtk

sudo aptitude install mysql-server mysql-client libmysqlclient15-dev
libmysql-ruby sqlite3 imagemagick -y


Install openssl from source - get
http://www.openssl.org/source/openssl-0.9.8h.tar.gz
untar it
cd into it

./config shared
make
make test
make install
cp /usr/local/ssl/lib/libssl.so.0.9.8 /lib
rm /lib/libssl.so.4
ln -s /lib/libssl.so.0.9.8 /lib/libssl.so.4
ldconfig
make
sudo make install
sudo apt-get build-dep ruby

...though you probably guessed all of that. I mean, it's pretty obvious, isn't it?


To get ruby working, I tried http://article.gmane.org/gmane.comp.lan … ils/203449
following instructions, except SUDOing each command, eg.
sudo ln -s /lib/libssl.so.0.9.8 /lib/libssl.so.4
and
sudo cp zutil.c /usr/local/include
etc...
this made no difference - ruby didn't work

Finally...

cd ruby-1.8.7-p72/
make clean
./configure --prefix=/usr/local --with-openssl-dir=/usr/lib --with-zlib-dir=/usr

then,,,

cd ruby-1.8.7-p72/ext/openssl
ruby extconf.rb --with-openssl-include=/usr/local/ssl/include
--with-openssl-lib=/usr/local/ssl/lib
make
sudo make install

Now you should have a ruby interpreter which works

Go to http://www.sqlite.org/download.html

Get sqlite-amalgamation-3.6.9.tar.gz or something like it (make sure it's 'the amalgamation together with an configure script and makefile for building it.').

tar xfvz sqlite-amalgamation-3.6.9.tar.gz
cd sqlite-amalgamation-3.6.9/
./configure
make 
sudo make install

then...

sudo gem install sqlite3-ruby

 

Finally...
rails myapp
cd myapp
script/server&
Point your browser at http://localhost:3000
YEEHAW!

Installing Merb is a whole nother ballgame - fortunately, Merb and Rails are merging.

 



Back
Portland London