Here’s another little problem I was just hitting and the solution in case it happens to help someone else out there.

If you’re trying to use a plugin (in this case the restful_authentication plugin) and you’re hitting an error like this when you use ./script/generate:

“Couldn’t find ‘authenticated’ generator”


Check to make sure that you have actually installed the plugin.

In my case, I’d done something like this:

matt@tigger:~/work/rails/streetloop$ script plugin install http://svn.techno-weenie.net/projects/plugins/restful_authentication/
Script started, file is plugin
matt@tigger:~/work/rails/streetloop$

I’d assumed this had installed the plugin, but I don’t think it had.

The correct syntax seemed to be this:

script/plugin install restful_authentication

[Note the use of the name of the plugin instead of the URL as before.]

This resulted in much more promising-looking output:

matt@tigger:~/work/rails/streetloop$ script/plugin install restful_authentication
+ ./README
+ ./Rakefile
+ ./generators/authenticated/USAGE
+ ./generators/authenticated/authenticated_generator.rb
+ ./generators/authenticated/templates/activation.html.erb
+ ./generators/authenticated/templates/authenticated_system.rb
etc.

Sure enough, with that installed, ./script/generate worked fine.

Hope that helps you too.

Categories: Technology

5 Comments

Jed Christiansen · March 9, 2009 at 2:25 pm

Thanks for this, Matt. It came up as the top result for the string as was exactly what I was looking for. Thank you!

Chris · April 10, 2009 at 12:31 pm

Thanks mate, perfect

Bladimir · September 7, 2009 at 7:42 pm

Thanks Matt, in my case I am using Ruby with Eclipse under Windows, when I run script/plugin install git://github.com/technoweenie/restful-authentication.git a windows command prompt shows up and then goes away, I though it was installed than I tried to run script/generate authenticated user sessions and I got the “Couldn’t find ‘authenticated’ generator” error, so I tried your suggestion but didn’t came up neither, so i tried to reinstall the plug-in by calling script/plugin install git://github.com/technoweenie/restful-authentication.git --force and the windows command prompt shows up and now it did show a more promising-looking output :)
Thanks.

AWIJOK · October 30, 2009 at 5:36 pm

Hi for windows users,
to install the restful authentication plugin for a ror project under Windows, i have downloaded the archive of restful_authentication from the url http://github.com/technoweenie/restful-authentication and past its content to the restful_authentication directory under the vendor/plugins directory of your project.
after that i have lunch the command :
ruby script/generate authenticated user sessions –include-activation

that’s all

Thanks for all.

afco · June 12, 2010 at 6:17 pm

as AWIJOK mentioned,
make sure you move the downloaded files to vendor/plugins

i believe rails looks in there by default.

thanks,

Leave a Reply

Your email address will not be published. Required fields are marked *