Hello Larry, Daniel, and Mohit,
I, too, have been exploring ActiveRBAC under Windows XP and
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
system follows the LINUX convention of
The offending code (at least so far for me) is a routine named realpath
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
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
creation and constraint creation at the same time. SO, I had to run
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
Of course, for your own application, you will have to change the
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.
On 6/9/06, Larry K. wrote:
I’ll be using ActiveRBAC in my current project. Am developing on Linux,
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
can be used instead of running the migrations. When I do the Windows
emplementation, I’ll try to remember to write a short tutorial on the
In the mean time, if you needs don’t require the full RBAC treatment,
might consider the user_engine.
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
“Work, work, work…there is no satisfactory alternative.”
— E.Taft Benson
-------------- next part --------------
An HTML attachment was scrubbed…