This is part 0 of Ramaze by Example, a tutorial on web development.
To install Ramaze, simply install the gem like you would any other gem:
gem install ramaze
Because this is a demonstration of real-world usage, we’ll use a proper HTTP server and adapter. Grab Mongrel and its dependencies:
gem install mongrel
You will not need a full blown web server such as Apache, nginx or lighttpd for this tutorial. A production deployment most likely will use one of these. If, after finishing this tutorial, you want more details on using Ramaze with a web server, see the Deployment section of the Ramaze wiki.
I will not cover PostgreSQL installation here. OSX and most Linux distros will have packages for it, so you can use your distro’s package manager to install it. For Windows, you have a choice of two installers. If you want to get down and dirty, there are full installation instructions on the PostgreSQL website.
M4DBI installation is done via gems as well:
gem install m4dbi
gem install dbd-pg
Installing m4dbi will pull the dbi gem as well, as a dependency. dbd-pg is the DBD we need to use with DBI for PostgreSQL. It will pull the pg gem as a dependency.
This tutorial was made, run and tested using the following software versions:
- Ruby 1.8.7
- Ramaze 2008.10
- DBI 0.4.0
- M4DBI 0.6.0
- dbd-pg 0.3.5
- pg (gem) 0.7.9.2008.10.05
- PostgreSQL 8.3.1
- mongrel 1.1.5
Note that pg-0.7.9.2008.10.13 is known to be incompatible with DBI 0.4.0, so make sure you’re not using that version. If necessary, specify an exact version, like:
gem uninstall pg
gem install --version 0.7.9.2008.10.05 pg
Next, we initialize things in PostgreSQL in Part 1: Database Schema.
Share ThisRelated posts:
Pingback by Catholicism Computes » Ramaze by Example — November 18, 2008 @ 13:21
[...] So let’s begin with Part 0: Installation and Preparation. [...]
Pingback by Catholicism Computes » Ramaze by Example - Part 1: Database Schema — November 19, 2008 @ 11:35
[...] Example - Part 4: ViewRamaze by Example - Part 3: ModelRamaze by Example - Part 2: Base ApplicationRamaze by Example - Part 0: Installation and PreparationRamaze by [...]