# How to install plugin: active\_record\_extensions.rb?

**URL:** <https://www.ruby-forum.com/t/how-to-install-plugin-active-record-extensions-rb/86033>\
**Category:** Rails\
**Created:** [February 19, 2007, 8:16am UTC](https://www.ruby-forum.com/t/how-to-install-plugin-active-record-extensions-rb/86033 "2007-02-19T08:16:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![carminem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90db22/32.png) [@carminem](https://www.ruby-forum.com/u/carminem)\
**Post date:** [February 19, 2007, 8:16am UTC](https://www.ruby-forum.com/t/how-to-install-plugin-active-record-extensions-rb/86033/1 "2007-02-19T08:16:12Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![carminem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90db22/32.png) [@carminem](https://www.ruby-forum.com/u/carminem)\
**Post date:** [February 19, 2007, 2:16pm UTC](https://www.ruby-forum.com/t/how-to-install-plugin-active-record-extensions-rb/86033/2 "2007-02-19T14:16:46Z")

</div>

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](http://www.agilewebdevelopment.com/rails-ecommerce)

Meet up at RailsConf:  
[http://railsconf2007.conferencemeetup.com/](http://railsconf2007.conferencemeetup.com/)

---

<div class="post-metadata">

**Author:** ![carminem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90db22/32.png) [@carminem](https://www.ruby-forum.com/u/carminem)\
**Post date:** [February 19, 2007, 9:37pm UTC](https://www.ruby-forum.com/t/how-to-install-plugin-active-record-extensions-rb/86033/3 "2007-02-19T21:37:29Z")

</div>

Hello Benjamin,

Thanks for your help!  
I put the extension under the “lib” directory as you suggested and it  
sort of works 🙂  
“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 🙂

Bye
