# Trying to Upgrade from Rails 1.2 to 2.1

**URL:** <https://www.ruby-forum.com/t/trying-to-upgrade-from-rails-1-2-to-2-1/146097>\
**Category:** Engines\
**Created:** [August 17, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/trying-to-upgrade-from-rails-1-2-to-2-1/146097 "2008-08-17T20:52:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![slain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2acd7d/32.png) [@slain](https://www.ruby-forum.com/u/slain)\
**Post date:** [August 17, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/trying-to-upgrade-from-rails-1-2-to-2-1/146097/1 "2008-08-17T20:52:24Z")

</div>

Hey, I’m trying to upgrade my rails projects that use engines to Rails  
2.1.

Currently I am stuck at:  
c:/dev/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/rails/plugin/loader.rb:145:in  
`ensure\_all\_registered\_plugins\_are\_loaded!’: Could not locate the  
following plugins: engines (LoadError)

There doesn’t seem to be any current or available documentation on how  
to create your own plugin anymore.

I grabbed the code from github’s zip.

Here is a snip from my environment.rb:

# automatically set the RAILS\_APP variable from the dirname

RAILS\_APP = File.basename(File.expand\_path(File.dirname(’…’))) unless (  
defined?(RAILS\_APP) and !RAILS\_APP.nil? and RAILS\_APP != “”)

# Bootstrap the Rails environment, frameworks, and default configuration

require File.join(File.dirname( **FILE** ), ‘boot’)

require File.join(File.dirname( **FILE** ),  
‘…/…/…/…/vendor/plugins/engines/boot’)

Rails::Initializer.run do |config|  
config.action\_controller.session\_store = :active\_record\_store

# config.plugins = [“engines”, “extended\_fragment\_cache”, “interact”,

“\*”]  
end

Note: I have extra …/…/…/… in the engines boot line because all of  
my environment.rb, boot.rb, and other config is located in my engine  
plugin, using load/eval (and ability to override in the main config) so  
every time something changes in Rails I just need to change it in one  
place.

My engine plugin (interact) has the following init.rb:  
require ‘interact’

# require\_dependency ‘interact’ # also tried this

What am I missing, or did something change in Rails Engines 2.X that  
doesn’t like config files being relocated?

Thanks!

---

<div class="post-metadata">

**Author:** ![slain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2acd7d/32.png) [@slain](https://www.ruby-forum.com/u/slain)\
**Post date:** [August 17, 2008, 9:02pm UTC](https://www.ruby-forum.com/t/trying-to-upgrade-from-rails-1-2-to-2-1/146097/2 "2008-08-17T21:02:32Z")

</div>

Hmm, seems like my plugin’s environment.rb is getting called over and  
over. Maybe there is some new magic that automatically loads plugin  
environment.rb’s from engines/plugins? Doesn’t appear to even make it  
to my \config\environment.rb anymore.

---

<div class="post-metadata">

**Author:** ![slain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2acd7d/32.png) [@slain](https://www.ruby-forum.com/u/slain)\
**Post date:** [August 17, 2008, 9:06pm UTC](https://www.ruby-forum.com/t/trying-to-upgrade-from-rails-1-2-to-2-1/146097/3 "2008-08-17T21:06:14Z")

</div>

Durr… Ignore me. I needed to update my plugin’s new boot.rb with the  
additional …/…/… to get back up to the real RAILS\_ROOT
