Site broken after updating to Rails 1.1? Tuesday evening, 28 March 2006
Does it involve an error message like this when you start webrick or lighttpd:
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5.4008/lib/active_support/dependencies.rb:125:in
‘const_missing’: uninitialized constant LoadingModule (NameError) from
./script/../config/environment.rb:81 from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in ‘require__’ from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in ‘require’ from script/server:44
Rails 1.1 seems to have an updated way of handling the environment.rb file. I generated a new rails site to compare the two files and they’re quite different. Also some stuff is now handled by a bootstrapping file at /config/boot.rb.
I managed to fix this one just by copying and pasting a freshly generated Rails 1.1 environment.rb file over my existing one (minus custom configuration at the bottom of the file), adding boot.rb to the config directory and restarting the server. For those that like step by step-
- Make a copy of /config/environment.rb
- Generate a new site with the rails command
- Copy the files environment.rb and boot.rb from the config directory of your new site into your existing one
- Copy anything after ‘# Include your app's configuration here:’ in your old environment.rb back to your new one
- Restart the server
Comments
Get Around
Journal
- contemplating.Thoughts from a Christian world-view.
- enjoying.Reviews of stuff i've been enjoying.
- life.For those that would like to know what i'm up to, this is the place to look.
- working.Thoughts and ideas on web development and projects i'm working on.
Other Places
- Flickr. Home of my photos.
- Artykins. My fiancé’s blog.
- HydeStreetChapel.org. My church.