Fork me on GitHub

Getting Started

An article by Gaspard Bucher

Running zena in development mode on your local machine.

Zena is distributed as an installable “gem” package for the ruby programming language.

Public internet server installation and adminstration requires advanced knowledge in system and network administration. Even though we ease zena deployment and maintenance, if you feel unsure with server management, we recommend taking an account at a zena hosting company.
If you just want first hand content editing experience with zena, simply register an account for the Wiki.

Ruby and System Requirements

Check Installing the Requirements first, especially if your operating system does not come with ruby preinstalled.



If you want the image resizing feature to work, install the rmagick gem. (You already checked the system requirements, right?)

gem install rmagick

Database Drivers

Depending on type of the database that you want to use, you will need to have the corresponding operating system driver and ruby gem installed ( i.e. “sqlite3” for the default “zena init”).

apt-get install libsqlite3-dev # or libmysql-dev
gem install sqlite3 # or mysql

Install Zena

gem install zena

Create a Zena Application

A zena application is just a rails application that includes the zena gem and uses zena’s routes.
To initialize a new zena application run:

zena new myapp

Initialize the Application

There is a shortcut that sets up a default configuration to test zena:

cd myapp
zena init

The following steps are executed by “zena init”, and you should execute them manually (adapted to your needs) if you are installing for real:

  1. configure config/database.yml settings (defaults to sqlite3)
  2. create the database
    rake db:create RAILS_ENV=production
  3. set up the tables in the database
    zena migrate
  4. create default website
    zena mksite HOST_LANG=en RAILS_ENV=production PASSWORD=admin HOST=localhost
  5. start the application
    script/server -e production

If you want to start the “webrick” server again, after quiting the server, just run:
script/server -e production

For anything more than a short test installation, you should consider installing and configuring a real local webserver package, instead of using the slow “webrick” that comes with ruby-on-rails.

See for yourself

You may watch a video and if you have any questions or remarks direct them to the mailing-list and we’ll be glad to help.

Now follow the rest of The Guide to Zena


  1. Saturday, November 22 2008 10:45 Fabio Cevasco

    §2 Initialize: Aso don’t forget to raname database_example.yml and edit it to be able to connect to the database…

  2. Saturday, November 22 2008 19:25 Gaspard

    Thanks for the comment. I updated the instructions.

  3. Sunday, December 13 2009 21:32 Iļja

    After $ zena myapp:
    create log/production.log
    create log/development.log
    create log/test.log
    applying template: /usr/lib/ruby/gems/1.8/gems/zena-0.15.1/lib/zena/deploy/template.rb
    The template [/usr/lib/ruby/gems/1.8/gems/zena-0.15.1/lib/zena/deploy/template.rb] could not be loaded. Error: /usr/local/lib/site_ruby/1.8/rubygems.rb:280:in `activate’: can’t activate rails (= 2.3.4, runtime) for [“zena-0.15.1”], already activated rails-2.3.5 for []

  4. Thursday, December 24 2009 11:01 Len Weincier

    I am getting the same error as Ilja :

    create log/test.log
    applying template: /Library/Ruby/Gems/1.8/gems/zena-0.15.1/lib/zena/deploy/template.rb
    The template [/Library/Ruby/Gems/1.8/gems/zena-0.15.1/lib/zena/deploy/template.rb] could not be loaded. Error: /Library/Ruby/Site/1.8/rubygems.rb:280:in `activate’: can’t activate rails (= 2.3.4, runtime) for [“zena-0.15.1”], already activated rails-2.3.5 for []

    Checked and everything is up to date ?

  5. Wednesday, January 06 2010 14:59 Gaspard

    Damn… this is stupid. I fixed the generator and released gem 0.15.2.

    Version 0.15.2 is a miny fix release. I cannot release the latest Sphinx support and other enhancements since these have not been thoroughly tested in production.

    By the way: I’m sorry it took me some time to notice these problems. The bug tracker: is watched more closely.

    Thanks for the feedback.

  6. Saturday, July 10 2010 02:31 Tim Bauman

    I get the similar errors to the ones other got in 0.15:
    rakefile zena_tasks.rake
    rake zena:assets OVERWRITE_ASSETS=true
    rake aborted!
    can’t activate rails (= 2.3.4, runtime) for [“zena-0.16.6”], already activated rails-2.3.8 for []
    /Users/Tim/myapp/Rakefile:10:in `require’
    (See full trace by running task with—trace)
    applied /usr/local/lib/ruby/gems/1.9.1/gems/zena-0.16.6/lib/zena/deploy/template.rb

  7. Sunday, July 11 2010 13:37 Gaspard

    Hi Tim,

    I pushed a new gem (0.16.7) that should solve this by requiring Rails 2.3.4 in “zena” command.

    By the way, I have a couple of tests left to fix these coming days and will release a beta version for the 1.0 branch.

  8. Monday, July 26 2010 15:32 Ollivier Robert

    Hello, Looking at the gem requirements, some things are not clear like does it support thin instead of mongrel? Is Passenger supported as well? What about using Bundler to automate this?

    Thanks, I’ll try to play with it soon. Any “upgrade” path from RadiantCMS for example?

  9. Friday, July 30 2010 21:21 Gaspard

    We are planning to use bundler when we migrate to Rails 3. A migration path from Radiant or other tools like Spip is an interesting idea. We have plans for regular tutorials and videos once the stable release is out. This could be interesting topics.

    Passenger is actually the prefered way to deploy Zena 1.x. We just need to update the capistrano tasks.

  10. Monday, November 22 2010 19:31 Alpha

    any target date for migration to rails 3?

  11. Tuesday, November 23 2010 09:36 Gaspard

    Our priority is 1.0 branch stability. We had to fix some important bugs lately (memory growth) and add some complex features (scope index). This means that the 1.0 branch needs some fixing.

    Dates: we are going live for a client in december 2010 with the 1.0 branch. We will start the migration to rails 3 + Ruby 1.9 as soon as we have a stable release (January/February 2011). I cannot tell when the transition to Rails 3 will be over. It can take two weeks or two months depending on the problems we encounter.

  12. Tuesday, August 14 2012 11:18 testing

    Install on debian squeeze:
    ruby1.8 (and symlink it to ”/usr/bin/ruby”)
    rubygems1.8 (from squeeze-backports to resolve i18n dependencies?)
    sudo gem install zena (and rake, sqlite3)
    downgrade to rubygems from squeeze (for zena init to get through)

  13. leave a comment