Problem with restful_authentication

Durant S. wrote:

Hi,

(newbie here)

I'm having a problem with the restful_authentication plugin.

[...]

I reloaded the restful_authentication today, but I'm not sure how to check the version number.

Ruby version 1.8.6 (powerpc-darwin8.9.0) RubyGems version 0.9.2 Rails version 1.2.3 Active Record version 1.15.3 Action Pack version 1.13.3 Action Mailer version 1.3.3 Active Support version 1.4.2 Edge Rails revision 7216 Environment development Database adapter mysql Database schema version 1

You might have to get an older version of restful_authentication as the newest only works with edge Rails AFAIK. If you run the test suite it should show lots of errors if you're on an incompatible version.

Try downgrading to r2563 and see if it helps.

Durant S. wrote:

Jacob Atzen wrote:

You might have to get an older version of restful_authentication as the newest only works with edge Rails AFAIK. If you run the test suite it should show lots of errors if you're on an incompatible version.

Try downgrading to r2563 and see if it helps.

-- Cheers, - Jacob Atzen

Hi Jacob,

Thanks for replying.

I'm not sure how to download an older version of the plugin (I didn't see anything after running and reading this: script/plugin --help).

Since I'm over my head with using edge rails, I'll probably try acts_as_authenticated instead. Thanks!

PS -

Here's what I tried:

# test 1

cd ~/Programming/ruby/rails/ \rm -rf restfulauthentication/* rails restfulauthentication cd restfulauthentication/ rake rails:freeze:edge REVISION=2563 script/plugin install restful_authentication #ERROR #script/plugin:3:in 'require': no such file to load -- commands/plugin (LoadError) # from script/plugin:3

# test 2

cd ~/Programming/ruby/rails/ \rm -rf restfulauthentication/* rails restfulauthentication cd restfulauthentication/ script/plugin install restful_authentication rake rails:freeze:edge REVISION=2563 # update config/database.yml # mysql -u MYUSERNAME -p -e "create database restfulauthentication_development" #! rake db:migrate #ERROR #(in ~/Programming/ruby/rails/restfulauthentication) #rake aborted! #Don't know how to build task 'db:migrate' #! rake migrate #ERROR #(in ~/Programming/ruby/rails/restfulauthentication) #rake aborted! #undefined method `cache_template_extensions=' for ActionView::Base:Class

# test 3

cd ~/Programming/ruby/rails/ \rm -rf restfulauthentication/* rails restfulauthentication cd restfulauthentication/ script/plugin install restful_authentication ./script/generate authenticated user sessions --include-activation # update config/database.yml rake db:migrate rake rails:freeze:edge REVISION=2563 script/server #ERROR #./script/../config/../vendor/rails/railties/lib/initializer.rb:159:in `send': undefined method `cache_template_extensions=' for ActionView::Base:Class (NoMethodError)

Oh no, I'm not saying you should freeze Rails to revision 2563, it was the plugin I was talking about. With plain svn that would be:

cd [into/rails-root]

svn export -r 2563 http://svn.techno-weenie.net/projects/plugins/restful_authentication/ vendor/plugins/restful_authentication

This version of the plugin should work with Rails 1.2.3.

You'll have to look in the logs and see why it's sending you from /new to #index. Check your routes too. The readme should help you out. Any edge rails issues are just limited to tests, they don't affect the actual plugin. All you'd have to do is add assert_difference methods and tests should pass.

I think you're just unfamiliar with the restful routing stuff and should probably stick with acts_as_authenticated until you're more comfortable with it. If you look at the form, it should be posting to /users, which should invoke the create action, not index. If something is redirecting you, you have some other underlying problem. I've seen this happen with faulty apache configs changing POST /users to GET /users/, for example.