# Config.plugin\_paths \<\< .. in environment/test.rb : ignored in Rails 2.0.2

**URL:** <https://www.ruby-forum.com/t/config-plugin-paths-in-environment-test-rb-ignored-in-rails-2-0-2/129111>\
**Category:** Rails\
**Created:** [February 14, 2008, 1:23pm UTC](https://www.ruby-forum.com/t/config-plugin-paths-in-environment-test-rb-ignored-in-rails-2-0-2/129111 "2008-02-14T13:23:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aravet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/49beb7/32.png) [@aravet](https://www.ruby-forum.com/u/aravet)\
**Post date:** [February 14, 2008, 1:23pm UTC](https://www.ruby-forum.com/t/config-plugin-paths-in-environment-test-rb-ignored-in-rails-2-0-2/129111/1 "2008-02-14T13:23:26Z")

</div>

Hi all,

I used to move test-only plugins (like mocha, …) to  
/vendor/plugins-test,  
and update config.plugin\_paths in environment/test.rb accordingly :  
file: environment/test.rb  
…  
config.plugin\_paths \<\< “#{RAILS\_ROOT}/vendor/plugins-test”  
…

Problem: after upgrading a project to Rails 2.0.2 it stopped working  
(test  
plugins are not loaded)  
Though, If I move that line to environment.rb, it works (but it defeats  
the  
purpose of test.rb).

Isn’t this a bug?

Alain R.

---

<div class="post-metadata">

**Author:** ![aravet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/49beb7/32.png) [@aravet](https://www.ruby-forum.com/u/aravet)\
**Post date:** [February 14, 2008, 3:06pm UTC](https://www.ruby-forum.com/t/config-plugin-paths-in-environment-test-rb-ignored-in-rails-2-0-2/129111/2 "2008-02-14T15:06:35Z")

</div>

On 14 Feb 2008, at 12:22, Alain R. wrote:

> Problem: after upgrading a project to Rails 2.0.2 it stopped working  
> (test  
> plugins are not loaded)  
> Though, If I move that line to environment.rb, it works (but it  
> defeats the  
> purpose of test.rb).

Rails 2.0 refactored plugin loading, and now plugin load paths are set  
before the environment is setup (ie before test.rb, development.rb are  
loaded).  
This certainly wasn’t intentional, I’d file a ticket/post on rails-core

Fred
