# Errors using restful-authentication + rubyist-aasm on 2.2.2

**URL:** <https://www.ruby-forum.com/t/errors-using-restful-authentication-rubyist-aasm-on-2-2-2/154198>\
**Category:** Rails\
**Created:** [November 26, 2008, 11:07am UTC](https://www.ruby-forum.com/t/errors-using-restful-authentication-rubyist-aasm-on-2-2-2/154198 "2008-11-26T11:07:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marzapower](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e79b87/32.png) [@marzapower](https://www.ruby-forum.com/u/marzapower)\
**Post date:** [November 26, 2008, 11:07am UTC](https://www.ruby-forum.com/t/errors-using-restful-authentication-rubyist-aasm-on-2-2-2/154198/1 "2008-11-26T11:07:04Z")

</div>

Hello,  
I’m asking for a problem which I cannot find a solution to.

I’m using a freshly installed Debian machine, with lighttpd as web  
server, ruby 1.8.5, rubygems 1.3.1, rails 2.2.2.  
I’m using both the sqlite3-ruby gem and the mysql gem for the database  
connection (same problem verified with both of them).

I just created a new test application, and added the latest relase of  
the restful-authentication plugin (found on github, obviously). I  
created a new authenticated user structure, using the command:

script/generate authenticated user sessions --include-activation --aasm  
–rspec

preferring the rubyist-aasm plugin over the acts\_as\_state\_machine one.

I started the application through thin, without special configuration  
(just thin start).

After I try registering a new user, I get this message:

NoMethodError in UsersController#create

You have a nil object when you didn’t expect it!  
The error occurred while evaluating nil.call\_action

RAILS\_ROOT: /www/rails/test  
Application Trace | Framework Trace | Full Trace

/usr/lib/ruby/gems/1.8/gems/aasm-0.0.2/lib/aasm.rb:124:in  
`aasm_fire_event' /usr/lib/ruby/gems/1.8/gems/aasm-0.0.2/lib/aasm.rb:59:in`register!’  
app/controllers/users\_controller.rb:18:in `create' /usr/bin/thin:19:in`load’  
/usr/bin/thin:19

Notice: the aasm gem has been installed using the latest release from  
the repository on github, compiling the gem locally. I don’t know why it  
has version number 0.0.2 instead of 2.0.2. By the way, I get the same  
error installing the aasm gem from the remote repository (which gives me  
a gem number-versioned 2.0.2).

I added two logger.debug calls on the method `aasm_fire_event` for  
logging the values of the parameter ‘name’ sent to the method and the  
parameter ‘aasm\_current\_state’ used where the method crashes, obtaining:

name = register (without quotes)  
aasm\_current\_state = ‘passive’ (quoted)

Can it be a problem with the quoted aasm\_current\_state parameter? Does  
anyone has a solution?

Thank you too much!
