ActiveRBAC?

Hello Larry, Daniel, and Mohit,

I, too, have been exploring ActiveRBAC under Windows XP and
InstantRails.

I ran into the same issue that you are seeing, and was confounded by it
for a few hours.

I fairly quickly discovered that the reason things were not working
according to the ActiveRBAC Manual was that the code for ActiveRBAC
assumes that you are running under a LINUX system - or at least your
file
system follows the LINUX convention of
/dir/some_other_dir/something_else/foo/bar…

The offending code (at least so far for me) is a routine named realpath
in
the file InstantRails\ruby\lib\ruby\1.8\pathname.rb

Since I am running InstantRails under Windows XP, I had to find a way
around this issue to continue with exploring ActiveRBAC.

I eventually got around this issue, but not by using the “rake
db:migrate:engines” command.

I have uploaded a batch file and 9 other supporting files in a ZIP file
attached to this message.

You need to:

  • download the ZIP file,

  • unzip the contents into the application directory for which you are
    trying to place the ActiveRBAC code

  • Open a Ruby console window - I open mine from the InstantRails
    application’s “Manage Rails Applications…” dialog box

  • change into the unziped directory (_create_db)

  • run the command rbac_mysql_doit.bat

This will populate a database named “rbac_test” with those tables needed
for RBAC, plus the tables used in the “Articles” sample program listed
within the ActiveRBAC Manual.

This set of files is required because MySQL can not properly handle
table
creation and constraint creation at the same time. SO, I had to run
eight
different SQL command files in order to create all of the ActiveRBAC
tables, then create the seven ActiveRBAC constraints.

Also, this set of files creates a user “admin” with password “password”
who has the role “Admin”.

This will at least allow you to continue along in the ActiveRBAC
Manual’s
Articles example.

Of course, for your own application, you will have to change the
database
table name listed in every rbac_mysql_X.sql file (where X=a, b, c, d, e,
f, g, and h). Also, you will probably NOT need the database table
“articles” created at the beginning of the rbac_mysql_a.sql file.

Happy Programming!

John Wolfe

On 6/9/06, Larry K. wrote:
I’ll be using ActiveRBAC in my current project. Am developing on Linux,
but
will be deploying on Windows Server 2003. I haven’t tried migrations on
Windows yet. But, ActiveRBAC has a schema.sql file for MS SQL Server
which
can be used instead of running the migrations. When I do the Windows
emplementation, I’ll try to remember :wink: to write a short tutorial on the
process.

In the mean time, if you needs don’t require the full RBAC treatment,
you
might consider the user_engine.

http://www.agilewebdevelopment.com/plugins/user_engine

-Larry

On 6/9/06, Mohit S. <mo_mail at onghu.com> wrote:

coded for unix systems in the confs).
Thanks for the pointers. I’m on Windows most of the time, so perhaps I
Rails mailing list
Rails at lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails


Best Regards,
-Larry
“Work, work, work…there is no satisfactory alternative.”
— E.Taft Benson
-------------- next part --------------
An HTML attachment was scrubbed…
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060609/ca81c736/attachment.html