Archive for January, 2007
Installing Rails and Mongrel on Ubuntu
So you have ruby installed and now you want to start putting together some web applications. There are several options when it comes to what web server you actually run your app on. More on that in a bit. First let’s install Rails on Ubuntu:
How to Make an ISO Image Using DD
The basic syntax for dd is:
dd if=INPUT-FILE-NAME of=OUTPUT-FILE-NAME
To make an ISO from your CD/DVD, place the media in your drive but do not mount it. If it automounts, unmount it.
dd if=/dev/dvd of=dvd.iso # for dvd
dd if=/dev/cdrom of=cd.iso # for cdrom
dd if=/dev/scd0 of=cd.iso # if cdrom is scsi
To make an ISO from files on your hard drive, create a directory which holds the files you want. Then use the mkisofs command.
mkisofs -o /tmp/cd.iso /tmp/directory/
This results in a file called cd.iso in folder /tmp which contains all the files and directories in /tmp/directory/.
Compiling Ruby on Ubuntu 6.10 (Edgy) How-to
Here’s a quick and dirty guide for compiling the latest recommended version of Ruby from source on Ubuntu 6.10:
- Download ruby-1.8.5-p12.tar.gz and unzip the contents to a temporary directory I’ll call INSTALL_DIR.
- Make sure you have what you need to compile: sudo apt-get install build-essential
- cd to INSTALL_DIR.
./configure (Update: you can optionally add –prefix=ALTERNATE_INSTALL_DIR)(see update below)
- ./make
- ./make test (hopefully you will get “test succeeded” as a response).
- sudo make install
- now test the install: ruby -v should respond with…
ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-linux]
That’s it!
Next I will document installing Rails on Ubuntu.
Update (2007-01-29): I referred to this post to fix an issue I had with the irb console not working. I had to compile the readline library and recompile ruby. After that, everything worked as expected. I also tried installing to my home directory using the prefix option and never got it to work correctly. In the end, installing using the default paths (/usr/local) worked best.
From Java to Ruby Journal Part 1: Introduction and the Decision
Introduction
This is the first post of many to come documenting my progress of porting an existing e-commerce web application from Java to Ruby on Rails.
Background on the Java Application
The Java application, after three years of nearly no changes to the code (other than routine maintenance and bug fixes) or the look and feel is in desperate need of some enhancements. After seeing Endless.com, the newest production from the folks at Amazon, I knew I wanted the opportunity to do something similar with my client’s slightly outdated and unoriginal website.
The Uber Java Web Application Directory Structure
As an exercise using a great new open source (free as in beer) tool I discovered called FreeMind, I put together this quick outline of my standard directory structure for Java web applications. It’s mostly based on the Sun guidelines. As far as I can tell the tool is a great alternative to the commercial MindMapper software. View the image below or download a PDF version.
