# UserEngine - rake bootstrap aborted =\> undefined method \`syn

**URL:** <https://www.ruby-forum.com/t/userengine-rake-bootstrap-aborted-undefined-method-syn/52828>\
**Category:** Rails\
**Created:** [January 19, 2006, 3:47pm UTC](https://www.ruby-forum.com/t/userengine-rake-bootstrap-aborted-undefined-method-syn/52828 "2006-01-19T15:47:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![damonh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@damonh](https://www.ruby-forum.com/u/damonh)\
**Post date:** [January 19, 2006, 3:47pm UTC](https://www.ruby-forum.com/t/userengine-rake-bootstrap-aborted-undefined-method-syn/52828/1 "2006-01-19T15:47:35Z")

</div>

Good day all.

I have successfully installed Engines and LoginEngine and LE is setup  
and  
running correctly.  
However, after installing and setting up UE, when attempting to run the  
rake  
bootstrap method I get the following error:

undefined method `synchronize\_with\_controllers’ for Permission:Class

My environment is  
Rails 1.0.0  
Ruby 1.8.2  
WinXP  
WebBRICK  
MySQL 4.1.14

I found the following in a thread about making changes to the  
user\_engine/app/models/permission.rb and have done this:

BEFORE CHANGE:

# we need to load all the controllers…

```
  controller_files.each do |file_name|
    require file_name #if /_controller.rb$/ =~ file_name
  end

```

AFTER CHANGE:

# we need to load all the controllers…

```
  controller_files.sort.each do |file_name|
    require file_name #if /_controller.rb$/ =~ file_name
  end

```

I also made the change in the KNOWN ISSUES page of UserEngines regarding  
the  
addition of the following lines in the appropriate place:  
guest.save  
admin.save  
user.save

Other than this, I can’t find anywhere that anyone else has reported  
this  
issue.  
Has anyone seen this or experienced this type of issue before?

Thanks,  
~damon

---

<div class="post-metadata">

**Author:** ![damonh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@damonh](https://www.ruby-forum.com/u/damonh)\
**Post date:** [January 19, 2006, 4:11pm UTC](https://www.ruby-forum.com/t/userengine-rake-bootstrap-aborted-undefined-method-syn/52828/2 "2006-01-19T16:11:42Z")

</div>

On 1/19/06, Damon H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> AFTER CHANGE:
> 
> # we need to load all the controllers…
> 
> ```
> controller_files.sort.each do |file_name|
> require file_name #if /_controller.rb$/ =~ file_name
> end
> 
> ```

What was this change meant to solve? I can’t imagine what sorting the  
controller file names would do, but anyway…

> I also made the change in the KNOWN ISSUES page of UserEngines regarding the  
> addition of the following lines in the appropriate place:  
> guest.save  
> admin.save  
> user.save

If you have the latest version (downloaded any time in the past… two  
weeks probably) you shouldn’t need this change. The calls to save are  
in the rake file, and raise exceptions if they fail.

> Other than this, I can’t find anywhere that anyone else has reported this  
> issue.  
> Has anyone seen this or experienced this type of issue before?

It might be worthwhile deleting and re-downloading your copy of the  
user\_engine directory, this sounds very odd. If you inspect the  
Permission class (user\_engine/app/models/permission.rb) you should see  
the method right at the top.

- james

---

<div class="post-metadata">

**Author:** ![damonh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@damonh](https://www.ruby-forum.com/u/damonh)\
**Post date:** [January 19, 2006, 4:29pm UTC](https://www.ruby-forum.com/t/userengine-rake-bootstrap-aborted-undefined-method-syn/52828/3 "2006-01-19T16:29:47Z")

</div>

James–

I appreciate the quick reply.  
Now, for your questions:

On 1/19/06, James A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On 1/19/06, Damon H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > AFTER CHANGE:
> > 
> > # we need to load all the controllers…
> > 
> > ```
> > controller_files.sort.each do |file_name|
> > require file_name #if /_controller.rb$/ =~ file_name
> > end
> > 
> > ```
> 
> What was this change meant to solve? I can’t imagine what sorting the  
> controller file names would do, but anyway…

On 12/9/2005 in another thread on rake bootstrap this was listed as  
needing  
to be done:  
n method synchronize\_with\_controllers find lines that say:

# we need to load all the controllers…

controller\_files.each do |file\_name|

and add a sort call in the second one:

# we need to load all the controllers…

controller\_files.sort.each do |file\_name|

Remove comments from the UserController and everything should work fine.

There is a dependency between UserEngine and LoginEngine which is not  
taken  
into account while loading controllers. It is just a quick hack but  
works  
for now.

It would be nice to have some way of specyfying dependencies between  
engines… On the other side it might unnecessary complicate things.  
Something to think about later 😉

> > Other than this, I can’t find anywhere that anyone else has reported  
> > this  
> > issue.  
> > Has anyone seen this or experienced this type of issue before?
> 
> It might be worthwhile deleting and re-downloading your copy of the  
> user\_engine directory, this sounds very odd. If you inspect the  
> Permission class (user\_engine/app/models/permission.rb) you should see  
> the method right at the top.

I thought this as well. Therefore, I completely removed the user\_engine  
directory and re-downloaded it.  
Once again, running ‘rake bootstrap’ from vendor/plugins/user\_engine  
directory produced the same error as before.

~damon

---

<div class="post-metadata">

**Author:** ![damonh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@damonh](https://www.ruby-forum.com/u/damonh)\
**Post date:** [January 19, 2006, 7:03pm UTC](https://www.ruby-forum.com/t/userengine-rake-bootstrap-aborted-undefined-method-syn/52828/4 "2006-01-19T19:03:52Z")

</div>

James–

That quote you are referring to came from the person posting to the list  
who  
suggested that change.  
It was NOT my quote 🙂

Doesn’t appear to be any errors when starting the enginges:

Attempting to copy public engine files from  
‘./config/…/vendor/plugins/login\_engine/public’  
source dirs:  
["./config/…/vendor/plugins/login\_engine/public/stylesheets"]  
Trying to start engine ‘login’ from  
‘C:/Projects/adchicken/vendor/plugins/login\_engine’  
adding C:/Projects/adchicken/lib to the load path  
adding C:/Projects/adchicken/vendor/plugins/login\_engine to the load  
path  
adding  
C:/Projects/adchicken/vendor/plugins/login\_engine/lib/login\_engine to  
the load path  
adding C:/Projects/adchicken/vendor/plugins/login\_engine/app/helpers to  
the  
load path  
adding C:/Projects/adchicken/vendor/plugins/login\_engine/app/models to  
the  
load path  
adding C:/Projects/adchicken/vendor/plugins/login\_engine/app/controllers  
to  
the load path  
Attempting to copy public engine files from  
‘./script/…/config/…/vendor/plugins/login\_engine/public’  
source dirs:  
["./script/…/config/…/vendor/plugins/login\_engine/public/stylesheets"]  
Trying to start engine ‘user’ from  
‘C:/Projects/adchicken/vendor/plugins/user\_engine’  
adding C:/Projects/adchicken/lib to the load path  
adding C:/Projects/adchicken/vendor/plugins/user\_engine to the load path  
adding C:/Projects/adchicken/vendor/plugins/user\_engine/lib/user\_engine  
to  
the load path  
adding C:/Projects/adchicken/vendor/plugins/user\_engine/app/helpers to  
the  
load path  
adding C:/Projects/adchicken/vendor/plugins/user\_engine/app/models to  
the  
load path  
adding C:/Projects/adchicken/vendor/plugins/user\_engine/app/controllers  
to  
the load path  
Attempting to copy public engine files from  
‘./script/…/config/…/vendor/plugins/user\_engine/public’  
source dirs:  
["./script/…/config/…/vendor/plugins/user\_engine/public/javascripts",  
“./script/…/config/…/vendor/plugins/user\_engine/public/stylesheets”]

Thanks,  
~d

---

<div class="post-metadata">

**Author:** ![damonh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@damonh](https://www.ruby-forum.com/u/damonh)\
**Post date:** [January 19, 2006, 5:15pm UTC](https://www.ruby-forum.com/t/userengine-rake-bootstrap-aborted-undefined-method-syn/52828/5 "2006-01-19T17:15:03Z")

</div>

On 1/19/06, Damon H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> There is a dependency between UserEngine and LoginEngine which is not taken  
> into account while loading controllers. It is just a quick hack but works  
> for now.

I’m not sure what the dependency is that you are referring to - could  
you clarify? But anyway…

> I thought this as well. Therefore, I completely removed the user\_engine  
> directory and re-downloaded it.  
> Once again, running ‘rake bootstrap’ from vendor/plugins/user\_engine  
> directory produced the same error as before.

Have you looked through your logs to see if there was a problem  
starting either of the engines? Post as much detail from the logs as  
you have - full error messages, etc

- james
