New Rails website development tool: "Goldberg"

Goldberg is a website development tool for Ruby on Rails that provides
user management, role-based security, site navigation via menus that
are dynamic depending on each user’s role, and content pages (a very
basic CMS).

It allows you to get Rails websites up and running quickly. It’s a
generator, so setting up a website takes only a few commands:

$ rails mysite
$ cd mysite
$ script/generate goldberg

Rails works alongside the models/views/controllers you create. It
provides them with security, and allows you to put any actions you want
(such as ‘list’) into your site menu. No extra coding is required:
your application requires no Goldberg-specific code; conversely
Goldberg requires no code specific to your application. There are no
APIs to learn, and no config files to hack. Goldberg comes with its
own management interface, through which you can set everything up.

Goldberg is free sofware (public domain). We’d love you to give it a
go, and let us know what you think.

Project website: http://www.goldberg.240gl.org
Development website: http://rubyforge.org/projects/goldberg


From: [email protected] on behalf of urbanus
Sent: Mon 21/08/2006 08:55
To: Ruby on Rails: Talk
Subject: [Rails] New Rails website development tool: “Goldberg”

Goldberg is a website development tool for Ruby on Rails that provides
user management, role-based security, site navigation via menus that
are dynamic depending on each user’s role, and content pages (a very
basic CMS).

It allows you to get Rails websites up and running quickly. It’s a
generator, so setting up a website takes only a few commands:

$ rails mysite
$ cd mysite
$ script/generate goldberg

Rails works alongside the models/views/controllers you create. It
provides them with security, and allows you to put any actions you want
(such as ‘list’) into your site menu. No extra coding is required:
your application requires no Goldberg-specific code; conversely
Goldberg requires no code specific to your application. There are no
APIs to learn, and no config files to hack. Goldberg comes with its
own management interface, through which you can set everything up.

Goldberg is free sofware (public domain). We’d love you to give it a
go, and let us know what you think.

Project website: http://www.goldberg.240gl.org
Development website: http://rubyforge.org/projects/goldberg

This looks very interesting…

I have Instant Rails ( on Windows XP ) and I can’t see a “generate”
folder anywhere ?

So where do I un-zip the files too ?

TIA - Davo

Hi Davo,

Unfortunately you’re going to have issues. Goldberg requires MySQL 5
or above, but “Instant Rails” has MySQL 4. You can install MySQL 5 on
WinXP, but Rails and MySQL 5 don’t play nicely together on Windows.
(But if you can get them working please let me know how you did it!)

The preferred platform at this stage is UNIX/Linux. Sorry if that
doesn’t help you much.

Soon I’m going to release a PostgreSQL database for Goldberg. This
should work on Windows or UNIX. Keep an eye out on the website.

But in answer to your question, in Windows you can put generators in:

C:\Documents and Settings\<userid>\.rails\generators\

If you try that with Goldberg you’ll find that you can run ruby script\generate goldberg, and that will work. You can even restore
the MySQL database. But once you run ruby script\server and try
browsing the site you’ll get script errors. Sorry, but as mentioned
above I hope to have a solution for this soon.

Regards,
Urbanus

do you know how does it compare with ActiveRBAC guys?

Hi Greg,

Goldberg is designed to do more. It provides you with role-based
access control, and it integrates that with site navigation: the menus
you see are the ones you’re allowed to see. It also includes a basic
CMS so you can set up pages. The menu items of the site are links
either to the site’s controllers’ actions, or to those pages.

Have a look at Goldberg’s main site – http://www.goldberg.240gl.org.
The site is itself developed in Goldberg.

Regards,
Urbanus

Thanks Urbanus,

Looks like I’ll have to set up my own Linux box that I’ve been meaning
to do for a couple of years :))))

Appreciate your prompt help.

regards, Davo

I use active_rbac + { streamlined | autoadmin | my_own_cms } for these
purposes.
But goldberg seems to be rather interesting . I’ll definitely have a
look .
Thanks , Urbanus !


wbr , Roman Semenenko

Good idea. I’ll see what I can come up with.

Hi Urbanus,

A sample site we could poke around in would be very useful.

Cheers

Hammed

I have a question . How can I integrate my own models and controllers
with goldberg ?
For example , I generate :
./script/generate controller Blog
./script/generate model Post Blog

then , i write a list function in blog controller and list.rhtml view
file . How can I embed this into goldberg menu , with needed
permissions , etc ?

Glad you asked.

First thing you’ll notice is that you won’t be able to access /blogs at
all: Goldberg will be “protecting” it. So you go to Goldberg’s control
panel at Administration > Setup > Controllers/Actions. Make a new
Controller called “blogs” and assign it a default Permission (such as
“Administer Site”). Now you’ll be able to access all the actions of
the blog controller (because you’re the administrator), but regular
users won’t.

Now you’ll probably want to add some Actions for blog. This allows you
to do two things:

  1. Give less restrictive permissions for certain Actions, so users can
    do some things to the blogs.
  2. Put an entry for “Blogs” in the site’s Menu somewhere. The site’s
    Menu links to Actions or Pages.

For instance you might add the Action blogs:list with a Permission such
as “Public Pages - View” or whatever Permission level you think is
appropriate.

So now you can go to the Menu editor at Administration > Setup > Menu
Editor and add blogs:list anywhere you want in the menu, and give it an
appropriate title.

All this takes a minute or two, and (as promised) requires no
Goldberg-specific code in your application, and no application-specific
code in Goldberg.

Regards,
Urbanus