problem working on old rails app

Hi there,

I hope my subject is ok. Basically, I was working on an app a few years
ago (say, spring of 2008) and want to start working on it again.

I checked out the lastest version of the code from rubyforge, got mysql,
updated rails and ruby (or so I think) and when I went to run
script/server I got:

`gem_original_require': no such file to load

I've looked through code and searched everywhere but haven't found
anything that helps me understand what's going on. I'm going to keep
looking but thought I'd post in case someone's got a clue (thanks!).

Thanks a pile ahead of time..

~ari

Hi there,

I hope my subject is ok. Basically, I was working on an app a few years
ago (say, spring of 2008) and want to start working on it again.

I checked out the lastest version of the code from rubyforge, got mysql,
updated rails and ruby (or so I think) and when I went to run
script/server I got:

`gem_original_require': no such file to load

I've looked through code and searched everywhere but haven't found
anything that helps me understand what's going on. I'm going to keep
looking but thought I'd post in case someone's got a clue (thanks!).

Thanks a pile ahead of time..

I'm guessing one or more of the gems used in this application aren't in your current gem environment. If you type gem env you will see where they are expected to live, and if you type gem list, you will see a list of all the gems that are actually installed. Since this app is from pre-Bundler days, you're going to have to dig out a list of all the gems (and versions) your application depends on and install them manually. Or, follow the directions at the bundler site for adding bundler to an older Rails application. http://gembundler.com/rails23.html That way you'll get modern dependency magick and your task will be vastly simplified.

Walter

Thanks for the help, Walter.

The more I work on this, the more I see that my problem is one of trying
to get old code up and running. I'm going to try that Bundler trick,
just to see what it does but that page describes how to get it running
in Rails 2.3 and a 'sudo gen install rails' brought in Rails 3.1.3.
Hopefully it'll still work but I think I'm going to pause a bit in my
efforts with that gem_original_require error and look at what the web
has to say about legacy (i.e. old) rails apps.

Thanks again!

~ari

gem install can be passed a version argument, so just install the version your application.rb has listed. Trying to bring up a Rails 2.3.x app under 3.1.3 is way too many moving parts for anyone. Yes, you should update, but just get it running and passing its tests under the original version before you try that.

Walter

goodness gracious I think the app is written in rails 1.2.3 because I
see this in my environment.rb file:

RAILS_GEM_VERSION = '1.2.3'

I thought I was up to 2.0 but I may not have committed those changes to
rubyforge's svn. Hmm...

I'm going to try your trick with passing gem install a version argument.
Let's see if they let me go that far back ; )

Ooof. Thanks.

So now I'm at rails 1.2.3 (when I do a 'rails --version' that's what I
get).

Only trick is that now I'm getting:

vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in
`load': no such file to load -- mongrel_rails (MissingSourceFile)

I'm going to start looking into it but I thought I'd update this thread.

Thanks Walter!

I've gotta go help give a 2 year old a bath so I figured I'd post my
latest update. Here's the full stack trace (pretty short):

./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in
`load': no such file to load -- mongrel_rails (MissingSourceFile)
  from
./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in
`load'
  from
./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in
`new_constants_in'
  from
./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in
`load'
  from
./script/../config/../vendor/rails/railties/lib/commands/servers/mongrel.rb:60
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
  from
./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in
`require'
  from
./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in
`new_constants_in'
  from
./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in
`require'
  from
./script/../config/../vendor/rails/railties/lib/commands/server.rb:39
  from ./script/server:3:in `require'
  from ./script/server:3

I've got those files in the 'commands' folder open and am starting to
trace their dependencies. It sure seems like a dependency issue (what
with every line quoting dependencies.rb :wink:

Surprisingly, this error isn't showing up much in google searches. I'll
try rewording it.

Maybe I need to rever to an older version of mongrel? Heck, an older
version of everything?

Thanks and cheers,

~ari

ps. Wouldn't it be handy if you could specify a date in time instead of
versions? So the 'gem' command would find the proper versions for,
say, june 2007. Hmm..

Holy camoley it's working.

Well, my app isn't showing but rails is booting, the servers up and I
get a nice page when I go to http://0.0.0.0:3000

I got the answer after searching for "no such file mongrel_rails". This
page
(http://efreedom.com/Question/1-6401240/Rails-Mongrel-RVM-Fails-Startup-Mongrel-Rails-MissingSourceFile)
mentioned downgrading to gem 1.4.1 via:

gem update --system 1.4.1

that did it!

Any idea why? I'm all sorts of curious, but I'm even happier that I can
move forward.

Phew!