# UserEngine bootstrap

**URL:** <https://www.ruby-forum.com/t/userengine-bootstrap/52267>\
**Category:** Engines\
**Created:** [January 12, 2006, 11:28am UTC](https://www.ruby-forum.com/t/userengine-bootstrap/52267 "2006-01-12T11:28:38Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [January 12, 2006, 11:28am UTC](https://www.ruby-forum.com/t/userengine-bootstrap/52267/1 "2006-01-12T11:28:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [January 12, 2006, 4:31pm UTC](https://www.ruby-forum.com/t/userengine-bootstrap/52267/2 "2006-01-12T16:31:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [January 12, 2006, 5:40pm UTC](https://www.ruby-forum.com/t/userengine-bootstrap/52267/3 "2006-01-12T17:40:35Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [January 12, 2006, 5:55pm UTC](https://www.ruby-forum.com/t/userengine-bootstrap/52267/4 "2006-01-12T17:55:30Z")

</div>

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

- james

---

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [January 12, 2006, 6:31pm UTC](https://www.ruby-forum.com/t/userengine-bootstrap/52267/5 "2006-01-12T18:31:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [January 12, 2006, 6:26pm UTC](https://www.ruby-forum.com/t/userengine-bootstrap/52267/6 "2006-01-12T18:26:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [January 12, 2006, 6:38pm UTC](https://www.ruby-forum.com/t/userengine-bootstrap/52267/7 "2006-01-12T18:38:21Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [January 12, 2006, 7:04pm UTC](https://www.ruby-forum.com/t/userengine-bootstrap/52267/8 "2006-01-12T19:04:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [January 12, 2006, 9:30pm UTC](https://www.ruby-forum.com/t/userengine-bootstrap/52267/9 "2006-01-12T21:30:32Z")

</div>

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/user_engine/tags/rel_1.0.1/tasks/user_engine.rake)  
[http://opensvn.csie.org/rails\_engines/plugins/user\_engine/tasks/user\_engine.rake](http://opensvn.csie.org/rails_engines/plugins/user_engine/tasks/user_engine.rake)

… _shrug_

- james

---

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [January 12, 2006, 7:18pm UTC](https://www.ruby-forum.com/t/userengine-bootstrap/52267/10 "2006-01-12T19:18:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nitr0z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ba9def/32.png) [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Post date:** [January 12, 2006, 10:49pm UTC](https://www.ruby-forum.com/t/userengine-bootstrap/52267/11 "2006-01-12T22:49:46Z")

</div>

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
