UserEngine bootstrap

Have people been experiencing problems running the bootstrap rake task
for the UserEngine? We’ve just noticed that while the task works fine
on some machines, it seems to fail with error messages like
“Permission was nil” on other machines.

It’s very strange, so I just wanted to collect the details of anyone
else who is experiencing these problems to give us a better chance of
figuring out the root cause.

  • james

James A. wrote:

Have people been experiencing problems running the bootstrap rake task
for the UserEngine? We’ve just noticed that while the task works fine
on some machines, it seems to fail with error messages like
“Permission was nil” on other machines.

It’s very strange, so I just wanted to collect the details of anyone
else who is experiencing these problems to give us a better chance of
figuring out the root cause.

  • james

I had the “permission was nil” problem happen once. It was after I had
been trying to figure out the problem with @content_for_columns (other
thread) happening with user/list. Its hard for me to know exactly what
fixed it, since I ultimately
(a) downloaded and installed the earlier version of the engine plugin,
and
(b) cleared all the user/engine related tables and started over.

After that, it worked.

HTH,
Keith

James A. wrote:

Have people been experiencing problems running the bootstrap rake task
for the UserEngine? We’ve just noticed that while the task works fine
on some machines, it seems to fail with error messages like
“Permission was nil” on other machines.

I got the error, everything seemed to have been inserted properly except
permissions_roles was empty. I patched user_engine.rake as described
here:

http://rails-engines.org/wiki/pages/UserEngine%3A+Known+Issues

Cleared out all the user_engine tables, and then the bootstrap task ran
properly.

Running:
Fedora Core 4
ruby 1.8.4
rails 1.0.0
engines - latest from SVN

Tim.

FYI, the patches described on that page were included in the 1.0.1
release.

  • james

Can you email me (personally) a copy of your fixed user_engine.rake
file? I’m curious as to why adding lines like ‘admin.save’ would be
necessary when there are lines like ‘raise … if !admin.save’

  • james

James A. wrote:

FYI, the patches described on that page were included in the 1.0.1
release.

  • james

James,
There may be a problem with the versioning, because even after I
reverted to 1.0.1 to fix the other issue with modules, I had to apply
the listed patches.

Keith

Sorry - should have included that in my other post.

James A. wrote:

Can you email me (personally) a copy of your fixed user_engine.rake
file? I’m curious as to why adding lines like ‘admin.save’ would be
necessary when there are lines like ‘raise … if !admin.save’

  • james

Sure … but I don not find !admin.save anywhere in this file! BTW, the
lines where i had to add the entries were actually blank lines, as
though something was missing.

How do I email you? You are logged in as guest and I’m not finding you
in the list for some reason.

Keith (email me personally if you wish)

Keith L. wrote:

James A. wrote:

FYI, the patches described on that page were included in the 1.0.1
release.

  • james

James,
There may be a problem with the versioning, because even after I
reverted to 1.0.1 to fix the other issue with modules, I had to apply
the listed patches.

The other issue with modules was referring to engines 1.0.1, this is in
reference to user_engine 1.0.1.

Tim.

I just installed the latest user engine via the script/plugin command,
and I have a user_engine/tasks/user_engine.rake with is 96 lines long,
and contains the following:

line 26: raise “Couldn’t save administrator!” if !u.save
line 34: raise “Couldn’t save administrator after assigning roles!”
if !u.save
line 48: raise “Couldn’t save guest role!” if !guest.save
line 54: raise “Couldn’t save guest role after setting
permissions!” if !guest.save
line 67: raise “Couldn’t save admin role!” if !admin.save
line 75: raise “Couldn’t save admin role after assigning
permissions!” if !admin.save
line 86: raise “Couldn’t save default user role!” if !user.save
line 94: raise “Couldn’t save default user role after assigning
permissions!” if !user.save

… you can verify this here:

http://opensvn.csie.org/rails_engines/user_engine/tags/rel_1.0.1/tasks/user_engine.rake
http://opensvn.csie.org/rails_engines/plugins/user_engine/tasks/user_engine.rake

shrug

  • james

Tim Greiser wrote:

Keith L. wrote:

James A. wrote:

FYI, the patches described on that page were included in the 1.0.1
release.

  • james

James,
There may be a problem with the versioning, because even after I
reverted to 1.0.1 to fix the other issue with modules, I had to apply
the listed patches.

The other issue with modules was referring to engines 1.0.1, this is in
reference to user_engine 1.0.1.

Tim.

Duh. You are right. Nevetheless, I had to apply the patch to my version
(which i think is the latest).

Keith

James A. wrote:

I just installed the latest user engine via the script/plugin command,
and I have a user_engine/tasks/user_engine.rake with is 96 lines long,
and contains the following:

> > - james

James,
It appears that I had the 1.0.0 version, which still required the patch.
For whatever reason, “script/plugin update user_engine” did not work -
it acted like it did, but it was not pulling down the new source. I
finally had to blow away the directory and re-install.

Keith