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!
on 2008-11-26 12:07