How to install plugin: active_record_extensions.rb?

Hi to everyone,

I’m working through the pragmatic programmer’s book, and I’m stuck at
the point where it’s
needed to installa a plugin in the “Web 2.0” chapter (page 527).
The plugin is: active_record_extensions.rb and is found at:

http://media.pragprog.com/titles/rails2/code/pragforms/vendor/plugins/relevance_extensions/lib/active_record_extensions.rb

I’ve tried with the “script/plugin install” way without luck.
Also tried to download the file and put manually under
/vendor/plugins/… path.

Is there anything I could do?

Thanks for your help

You can put the file in lib/ and add “require
‘active_record_extensions’” to config/environment.rb. The code will
be loaded when you restart the server.

If you wanted to install the full plugin, you would do this:
script/plugin install svn://rubyforge.org/var/svn/arext/trunk/ar-
extensions


Building an e-commerce site with Rails?
http://www.agilewebdevelopment.com/rails-ecommerce

Meet up at RailsConf:
http://railsconf2007.conferencemeetup.com/

Hello Benjamin,

Thanks for your help!
I put the extension under the “lib” directory as you suggested and it
sort of works :slight_smile:
“Sort of” because it doesn’t complain anymore about the missing
extensions, still it doesn’t
behave “as advertised”. This, I am sure, is my fault :slight_smile:

Bye