Forum: Rails Engines UserEngine bootstrap

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
James Adam (Guest)
on 2006-01-12 11:28
(Received via mailing list)
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
F7010e33f9125b64e0a3a4966611aaaa?d=identicon&s=25 Keith L. (klancaster)
on 2006-01-12 16:31
James Adam 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
3c39174069b01d076666d7ca933e397b?d=identicon&s=25 Tim G. (tgreiser)
on 2006-01-12 17:40
James Adam 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+...

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.
James Adam (Guest)
on 2006-01-12 17:55
(Received via mailing list)
FYI, the patches described on that page were included in the 1.0.1
release.

- james
F7010e33f9125b64e0a3a4966611aaaa?d=identicon&s=25 Keith L. (klancaster)
on 2006-01-12 18:26
James Adam 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 Adam (Guest)
on 2006-01-12 18:31
(Received via mailing list)
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
F7010e33f9125b64e0a3a4966611aaaa?d=identicon&s=25 Keith L. (klancaster)
on 2006-01-12 18:38
James Adam 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)
3c39174069b01d076666d7ca933e397b?d=identicon&s=25 Tim G. (tgreiser)
on 2006-01-12 19:04
Keith Lancaster wrote:
> James Adam 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.
F7010e33f9125b64e0a3a4966611aaaa?d=identicon&s=25 Keith L. (klancaster)
on 2006-01-12 19:18
Tim Greiser wrote:
> Keith Lancaster wrote:
>> James Adam 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 Adam (Guest)
on 2006-01-12 21:30
(Received via mailing list)
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/...
http://opensvn.csie.org/rails_engines/plugins/user...

...... *shrug*

- james
F7010e33f9125b64e0a3a4966611aaaa?d=identicon&s=25 Keith L. (klancaster)
on 2006-01-12 22:49
James Adam 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:

<snip>
>
> - 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
This topic is locked and can not be replied to.