updated 'gem'-unintialized constant ActiveRecord??

I would REALLY appreciate help with this. It's driving me crazy, and I've accidentally messed up my app.

I was working on something that asked me to do a 'gem update --system'. So I did. And then it broke my app.

First it was complaining about "require_gem". Okay, I hunted down that that's obsolete, and I had to fix my old config/boot.rb to be the new config/boot.rb that rails today would generate, without obsolete code. Good enough. I did that, now my app gets further. But still won't start up.

Huh, how can it not find ActiveRecord, what the heck?

Exiting /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:267:in `load_missing_constant': uninitialized constant ActiveRecord (NameError)         from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:453:in `const_missing'         from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:465:in `const_missing'         from /usr/local/home/rochkind/U2/config/environment.rb:23         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'         from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require'         from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:in `new_constants_in'         from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require'          ... 21 levels...         from /usr/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/commands/server.rb:39         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'         from ./script/server:3

I was working on something that asked me to do a 'gem update --system'.

So I did. And then it broke my app.

Why did you need to run the gem command?

Which platform are you on? Mac OS X? Some `gem` operations seem to break gem installs.

T K wrote:

I was working on something that asked me to do a 'gem update --system'.

So I did. And then it broke my app.

Why did you need to run the gem command?

Which platform are you on? Mac OS X? Some `gem` operations seem to break gem installs.

I am on Linux, Red Hat.

I installed the ruby-prof gem, and then put the plugin into a little test app, to test it out. When I tried to start the test app, it told me I needed to update all my gems. So I (stupidly) did. Gem dependency issues are killing me here.

Where in environment.rb do you have that? ActiveRecord is only going to be defined once the initialisation process has loaded ActiveRecord. Any point after the Rails::Initializer.run ... block should be fine.

Fred

Frederick Cheung wrote:

Um....

From what you say, you've ripped out your boot.rb file and replaced
it, but not replaced the rest of your app!

If I were you, from my experience, I'd be rebuilding your app around a
new rails generated skeleton.

Julian.

Learn Ruby on Rails! Check out the FREE VIDS (for a limited time)
VIDEO #3 out NOW! http://sensei.zenunit.com/

Are there any guides anywhere to doing that? This is a very large app. I am a bit anxious over the idea of "rebuilding my app around a new rails generated skeleton".

My issue is that this app was originally built for Rails 1.2.1, but I want to get it working on 1.2.6. It seems as if there were some significant changes to Rails skeleton files between these versions.

If I generate a new 1.2.6 app, and then take ALL the skeleton files and pop them into my app, should that work? It's a lot easier for source control than taking the skeleton and trying to move all my own files into it (I want to go the other way instead).

Thanks for any advice. Rails backwards compatibility (or lack thereof) is turning into rather a nightmare for me!

Jonathan

Julian Leviston wrote: