Software Development | Ruby on Rails
Installing adva-cms on Windows

Warning

I failed to get this working on Windows. I have documented how far I got. I'll come back to it at some point.

Which Ruby CMS Should I Use looks at the current major contenders in the Ruby on Rails space:

Just off hand adva-cms looks the most promising for me as it comes with core engines such as:

  • Cms build multiple sites with hierarchically organized sections
  • Blog: blogging system heavily inspired by Mephisto
  • Wiki: a wiki engine inspired by Signal Wiki
  • Forum: a forum system inspired by Beast

Getting Started with the Rails Template

So I thought I'd give it a go and Get Started with adva-cms. The installation instructions are pretty simple:

Installation: Release 0.3.0
===========================

Required: Rails 2.3.4, ImageMagick for image handling

# install Rails 2.3.4 gems if you don't have them already
  sudo gem install rails --source http://gems.rubyonrails.org

# install and setup adva-cms using a template
  rails my-app -m http://github.com/svenfuchs/adva_cms/raw/master/templates/adva-cms.0.3.0.rb

# there's no step 3>   cd my-app
  ruby script/server
  open http://localhost:3000

Unfortunately it isn't quite so easy in Windows. The easy bit was confirming I had the right version of Rails. adva-cms requires Rails 2.3.4 which is convenient as I've just upgraded to 2.3.5.

The guts of the work is done by a rails template. This is the command in question (the command is artificially split over two lines):

>rails test-adva -m 
  http://github.com/svenfuchs/adva_cms/raw/master/templates/adva-cms.0.3.0.rb

This didn't work for me. Inside the template the script runs this command (once again split over two lines here):

git :clone => 'git://github.com/svenfuchs/adva_cms.git vendor/adva 
  # this might take a bit, grab a coffee meanwhile :)'

Lesson Number 1: Install Git

Okay, should have been obvious but you need Git installed. Still didn't work. I got a this error:

github.com[0: 207.97.227.239]: errno=No such file or directory.

Lesson Number 2: Configure Git

It seems that Git needs two configuration settings to work (user.name and user.email). See Git configured.

Lesson Number 3: Join GitHub

Doh. yup, to clone from github you have to join it. See Joining GitHub.

Lesson Number 4: Something Funny with Git Cloning on Windows?

Now I saw some action. It actually copied lots of files to my system but the script bombed with ...

Executing git checkout -b tag/0.3.0 0.3.0 from C:InstantRails-2.0/rails_app/test-adva/vendor/adva
fatal: Not a git repository (or any of the parent directories: .git

It turns out that the clone had not put adva-cms files in test-adva/vendor/adva but had put it put the material at test-adva/adva_cms. No wonder git couldn't find a repository to checkout. 

I can only guess that the clone command in Windows ignores the target folder specified and does it in the current location.

I copied all the contents of test-adva/adva_cms to test-adva/vendor/adva then ran the checkout manually.

cd test-adva/vendor/adva
git checkout -b tag/0.3.0 0.3.0

Worked. Yay!

Lesson Number 5: Something odd with Rake on Windows

The next command in the install script is:

rake 'adva:install:core -R vendor/adva/engines/adva_cms/lib/tasks'

Rails didn't know how to build the task 'adva:install:core -R vendor/adva/engines/adva_cms/lib/tasks'. I checked that vendor/adva/engines/adva_cms/lib/tasks actually contained rake tasks. No problem there. Next I tried stripping off the quotes:

rake adva:install:core -R vendor/adva/engines/adva_cms/lib/tasks

Now the error was:

installing engines: adva_activity, adva_blog, adva_cms, adva_comments, adva_rbac, adva_user
rake aborted!
unknown file type: ../adva/engines/adva_activity

A quick google showed that other people experienced problems although not quite this one. None-the-less I tried monojetski's suggestion and hacked adva_cms.rake to make line 160 the same as line 164.

From

"../adva/#{type}" + (subdir ? "/#{subdir}" : '') 

To

"#{rails_root}/vendor/adva/#{type}" + (subdir ? "/#{subdir}" : '') 

This got me further but the rake command still bombed...

installing engines: adva_activity, adva_blog, adva_cms, adva_comments, adva_rbac, adva_user
installing plugins: adva_cells
rake aborted!
no such file to load -- json

And at that point I gave up and decided to cook dinner instead.