Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Deprecation warning (RAILS_ROOT) under Rails 3 #12

wincent opened this Issue · 6 comments

3 participants


Just started experimenting with Rails 3 and am seeing deprecation warnings on starting up the server or the console in the Rails development/test environments:

DEPRECATION WARNING: RAILS_ROOT is deprecated! Use Rails.root instead. (called from load_example_data at src/vendor/gems/fixture_replacement-3.0.1/lib/fixture_replacement/class_methods.rb:20)

Haven't actually got the app up and running yet under Rails 3, so can't confirm whether FixtureReplacement actually works or not yet.

If I can get it working I'll see if I can whip up a patch to silence the warning.



Thanks wincent. I haven't tried to use it with rails 3 yet. I'll update when rails 3 support is added.


Pushed a couple of commits to the "rails3" branch in my fork:

One makes the spec and test suites pass under Rails 3.

The other silences the deprecation warning.

I didn't update the tests yet, so currently only the RAILS_ROOT code path is being tested. Let me know if you think the other code path should be tested (although it seems a bit convoluted).



Hey Wincent,

I'll look to merge these changes into the main repository either tonight or tomorrow.


According to fixture_replacement should use a Railtie to make sure Rails.root is set. I did not look into how to do that, but the problem just hit my setup making Rails 3 unable to find my example data.


Great, thanks. I've used that approach in my rails3 branch

It works now ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.