How to install Rails on the EEEPC subnotebook part 2
This is about a Rails project with gruff graphics in it.
After a day messing around with gruff and RMagick, I finally decided that the Xandros distro which comes with the EEEPC is too idiosyncratic. Forget all the hacks I had to do to make Rails work with this bizarre version of Linux - I decided to make all my machines UBUNTU.
https://help.ubuntu.com/community/EeePC
Remove any little SIM cards you've got stuck in your machine, then shove the USB card containing Ubuntu into the slot, then reboot, hit F2 when it says 'hit F2 for setup' and manouver around the menus 'til you find 'boot sequence'. Set the first boot disk to 'Removable' and set the 'boot order' with 'Removable' at the top.
I had to reboot several times, hitting F2 when the computer started up, and selectiing the hard drive as the first boot drive, removing the USB card and the little SIM card to make sure the computer booted from the hard drive on which I'd just installed Ubuntu.
Then to get Wireless Networks to connect, I had to follow the instructions here:
https://help.ubuntu.com/community/EeePC/Fixes
Now the fun begins...
First create file install.sh, which looks like this:
--------------------------
#!/bin/bash
DIR=`pwd`
FILENAME=$1
doIt()
{
wget "$FILENAME"
FILENAME=`basename $FILENAME`
tar xvfz $FILENAME
FILENAME=`echo $FILENAME | sed 's/\.tgz$//'`
FILENAME=`echo $FILENAME | sed 's/\.gz$//'`
FILENAME=`echo $FILENAME | sed 's/\.tar$//'`
echo ""
echo "Installing $FILENAME"
echo ""
cd $FILENAME
sudo ruby setup.rb all
./configure
ruby extconf.rb
make
sudo make install
cd $DIR
}
if [ "" == "$1" ] ; then
echo "Give as an argument the URL of a tgz or tar.gz file"
echo "It will download, unzip, make and install the software"
exit 1
fi
DIR=`pwd`
FILENAME=$1
doIt
--------------------------
then
export PATH=.:$PATH
DIR=`pwd`
sudo apt-get update
sudo aptitude update
sudo aptitude install -y build-essential
install.sh ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz
sudo apt-get install -y rdoc
install.sh http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
sudo apt-get install -y libxml-ruby libxslt-ruby libxml2 libxslt1-dev
sudo apt-get install -y ruby1.8-dev
sudo aptitude install -y openssl-ruby
sudo apt-get install -y libssl-dev
sudo apt-get install -y libopenssl-ruby
sudo apt-get install -y libopenssl-ruby1.8
sudo gem install rails
wget http://www.openssl.org/source/openssl-0.9.8h.tar.gz
tar xvfz openssl-0.9.8h.tar.gz
cd openssl-0.9.8h
sudo cp /usr/local/ssl/lib/libssl.so.0.9.8 /lib
sudo rm /lib/libssl.so.4
sudo ln -s /lib/libssl.so.0.9.8 /lib/libssl.so.4
sudo ldconfig
make
sudo make install
cd $DIR
sudo gem install openssl
sudo gem install openssl-ruby
sudo apt-get build-dep ruby
sudo apt-get install -y sqlite
sudo gem install sqlite3-ruby
wget http://www.sqlite.org/sqlite-amalgamation-3.6.23.1.tar.gz
tar xvfz sqlite-amalgamation-3.6.23.1.tar.gz
cd sqlite-3.6.23.1
./configure
make
sudo make install
cd $DIR
install.sh http://rubyforge.org/frs/download.php/56820/RMagick-2.9.2.tar.gz
sudo gem install gruff
sudo apt-get install -y imagemagick
sudo apt-get install -y libmagickwand-dev
install.sh ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.6.1-1.tar.gz
sudo cp -R ImageMagick-6.6.1-1/magick/ /usr/include/
wget http://hivelocity.dl.sourceforge.net/project/freetype/freetype2/2.3.11/freetype-2.3.11.tar.gz
tar xzvf freetype-2.3.11.tar.gz
cd freetype-2.3.11
./configure --prefix=/usr/local
make
sudo make install
cd $DIR
wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.4.0.tar.gz
tar xzvf libpng-1.4.0.tar.gz
cd libpng-1.4.0
./configure --prefix=/usr/local
make
sudo make install
cd $DIR
wget http://www.ijg.org/files/jpegsrc.v8.tar.gz
tar xzvf jpegsrc.v8.tar.gz
cd jpeg-8
ln -s `which glibtool` ./libtool
./configure --enable-shared --prefix=/usr/local
make
sudo make install
cd $DIR
wget ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.9.2.tar.gz
tar xzvf tiff-3.9.2.tar.gz
cd tiff-3.9.2
./configure --prefix=/usr/local
make
sudo make install
cd $DIR
wget http://ghostscript.com/releases/ghostscript-8.70.tar.gz
tar xzvf ghostscript-8.70.tar.gz
cd ghostscript-8.70/
./configure --prefix=/usr/local
make
sudo make install
cd $DIR
wget ftp://ftp.imagemagick.org/pub/ImageMagick/delegates/ghostscript-fonts-std-8.11.tar.gz
tar xzvf ghostscript-fonts-std-8.11.tar.gz
sudo mv fonts /usr/local/share/ghostscript
cd $DIR
echo "Current working folder is"
pwd
echo "Going into ImageMagick-6.6.1-1"
cd ImageMagick-6.6.1-1/
export CPPFLAGS=-I/usr/local/include
export LDFLAGS=-L/usr/local/lib
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --with-gs-font-dir=/usr/local/share/ghostscript/fonts --disable-shared
make
sudo make install
cd $DIR
install.sh ftp://ftp.nrc.ca/pub/packages/graphics/imagemagick/delegates/libjpeg-6b.tar.gz
export LD_LIBRARY_PATH=/usr/local/lib
cd $DIR
echo "Current working folder is"
pwd
echo "Going into RMagick-2.9.2"
cd RMagick-2.9.2/
sudo ruby setup.rb all
sudo ruby setup.rb configure
sudo ruby setup.rb setup
sudo ruby setup.rb install
cd $DIR
sudo apt-get install -y imagemagick
sudo apt-get install -y libmagickwand-dev
sudo apt-get install -y imagemagick
sudo gem install rmagick
cd $DIR
cd ruby-1.8.7-p72/
make clean
./configure --prefix=/usr/local --with-openssl-dir=/usr/local/lib --with-zlib-dir=/usr/local/lib
cd ext/openssl/
ruby extconf.rb --with-openssl-include=/usr/local/ssl/include --with-openssl-lib=/usr/local/ssl/lib
cd ../..
make
sudo make install
cd $DIR
Then cd into your rails project, run script/server, and navigate your browser to localhost:3000
Back