Update

Goldberg’s main distribution medium in the future will be git. You can get the latest version from:

Urbanus’ goldberg on GitHub

The wiki at that site has more instructions on installation and usage.

The Instructions below apply to pre-Rails-2.1, gemmed versions of Goldberg. Users of Rails 2.1 should refer to the GitHub site above.

Installation

Attention upgraders: If you are upgrading a Goldberg site from a previous version it is important that you read the upgrading notes, below.

Installation via Rubygems

This is the easiest and recommended method of installation. You don’t need to manually download anything—simply install the gem directly from Rubyforge’s repository like so:

gem install goldberg_generator

When prompted to install dependencies press Y. Once this is complete the Goldberg generator will be installed on your system and ready to use.

Note: If you don’t have administrator rights (e.g. you are using shared hosting) you can still install Goldberg via Rubygems – you just have to set up your own local gem repository. See Local Gems and Goldberg for more information.

Installation from Subversion

If you can’t or won’t install Goldberg from the Rubygem, you can check out Goldberg from the RubyForge Subversion repository.

The Goldberg project uses release branches. Don’t check out from the trunk unless you are interested in cutting edge (and potentially non-functional) code. The current branch is “0.2”, so you could check it out as a generator as follows:

cd ~/.rails/generators
rm -rf goldberg
svn export svn://rubyforge.org/var/svn/goldberg/branches/0.2/goldberg

If you install Goldberg manually you don’t get the advantage of automatic dependency management that Rubygems provides. To get Goldberg working you will also need to install the following:

  • Rails version 2.0.x or above.

Creating Goldberg Sites

1. Use rails to set up a Rails site:

rails mysite

2. Go into that site and generate the Goldberg code:

cd mysite
script/generate goldberg template

(On Windows: ruby.exe script\generate goldberg template)

Where “template” is one of the following:

  • default: the old-style Goldberg blue layout.
  • ewnf: “Earth Wind and Fire”—a colourful fixed-width layout with a dynamic vertical menu on the left.
  • snooker: “Snooker”—an easy to customise fluid layout with a dynamic menu across the top and a 200 pixel fixed-width right column.
  • spoiled_brat: “Spoiled Brat”—an attractive fluid layout with a dynamic vertical menu on the right.

3. Create a database and edit your config/database.yml file accordingly.

4. Complete the setup of your Goldberg site:

rake goldberg:install

You should now be ready to start your server.

Upgrading

Before upgrading Goldberg you should take backups both of your database and of your site’s directory.

For production Goldberg sites it is strongly recommended that you make a copy and do a trial upgrade on it first.

Goldberg 0.2.2 is the first release to support Rails 2.0. There are a number of minor yet incompatible changes from the previous Goldberg release. Goldberg 0.2.1 only works with Rails 1.2.x, and Goldberg 0.2.2 only works with Rails 2.0 and above.

Because of this, the best and easiest way to upgrade is to delete RAILS_ROOT/vendor/plugins/goldberg from your project, run script/generate (as described above) to put the latest files in place, and then run the following Rake task:

rake goldberg:upgrade

This task only runs the migrations to bring the database up-to-date. Nothing further is required.

FCKeditor

Goldberg has optional support for FCKeditor to edit your content pages, including back-end integration for file management and spell checking.

If Goldberg finds fckeditor in your public/ directory (i.e. RAILS_ROOT/public/fckeditor exists and is a directory) FCKeditor support will be enabled, and it will be the default markup style. Otherwise you can still keep editing your pages just as before using the other markup styles.

Simply download the latest version of FCKeditor from their website and unzip/untar it into your public/ directory and enjoy!

Shared Hosting and Goldberg

Goldberg works quite nicely with Dreamhost. This site is evidence: it’s a Goldberg site running on Dreamhost right now!

I’d be very interested in hearing from users who get Goldberg up and running on other hosting providers. Please e-mail your feedback directly to urbanus at 240gl dot org.

Dreamhost

Dreamhost has detailed instructions on getting Rails up and running here: http://wiki.dreamhost.com/index.php/Ruby_on_Rails.

Please pay particular attention to the “Troubleshooting” section. Dreamhost has a daemon that sweeps through periodically and kills long-running processes. If this happens while a user’s page is being rendered they’ll get script errors. This isn’t particularly harmful, but it’s not very user-friendly either. However the “Troubleshooting” section documents how to edit your dispatch.fcgi to prevent this from happening.

Site5

Users report that Goldberg works just fine with Site5.


Login