Error with mongrel_rails start

When I make an empty Rails web application, and go through the steps
to create/include a database, and scaffold, mongrel_rails start (or
ruby script/server) works just fine. However, I attempted this with a
pre-existing web app and I got some errors.

First, I gathered the app's folder (checked the contents, it has all
the folders plus one extra: components) and placed it under ruby/
rails_apps.
Then, to see if I could run it locally, I opened up Instant_Rails,
opened the Ruby Console Window, changed the directory to ruby/
rails_apps/alpha (alpha is the name of the app folder). Then I tried
to start Mongrel using mongrel_rails start. The first time I tried
this I got:

Cannot find gem for Rails =1.1.6:
      Install the missing gem with 'gem install -v=1.16 rails' or
      change environment.rb to define RAILS_GEM_VERSION with your
desired
      version.

So, I changed my directory back to /ruby and entered 'gem install -
v=1.16 rails'.
It successfully installed 6 gems: activesupport-1.3.1,
activerecord-1.14.4, actionpack-1.12.5, actionmailer-1.2.5,
actionwebservice-1.1.6, and rails-1.1.6. Two errors came up while
generating documentation, once for activesupport-1.3.1 and one for
actionpack-1.12.5. Otherwise the installation completed and it
returned me to the prompt:

Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed activesupport-1.3.1
Successfully installed activerecord-1.14.4
Successfully installed actionpack-1.12.5
Successfully installed actionmailer-1.2.5
Successfully installed actionwebservice-1.1.6
Successfully installed rails-1.1.6
6 gems installed
Installing ri documentation for activesupport-1.3.1...
ERROR: While generating documentation for activesupport-1.3.1
... MESSAGE: Unhandled special: Special: type=17, text="<!-- HI -->"
... RDOC args: --ri --op C:/ruby/ruby/lib/ruby/gems/1.8/doc/
activesupport-1.3.1/
ri --quiet lib
(continuing with the rest of the installation)
Installing ri documentation for activerecord-1.14.4...
Installing ri documentation for actionpack-1.12.5...
ERROR: While generating documentation for actionpack-1.12.5
... MESSAGE: Unhandled special: Special: type=17, text="<!-- The
header part o
f this layout -->"
... RDOC args: --ri --op C:/ruby/ruby/lib/ruby/gems/1.8/doc/
actionpack-1.12.5/ri
--quiet lib
(continuing with the rest of the installation)
Installing ri documentation for actionmailer-1.2.5...
Installing ri documentation for actionwebservice-1.1.6...
Installing RDoc documentation for activesupport-1.3.1...
Installing RDoc documentation for activerecord-1.14.4...
Installing RDoc documentation for actionpack-1.12.5...
Installing RDoc documentation for actionmailer-1.2.5...
Installing RDoc documentation for actionwebservice-1.1.6...

(Then the prompt returned. I assume that meant the install finished).
So I changed back to /ruby/rails_apps/alpha and tried mongrel_rails
start.
Here is what I got:

C:/ruby/rails_apps/alpha/config/boot.rb:28: undefined method
`require_gem' for m
ain:Object (NoMethodError)
        from C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:i
n `gem_original_require'
        from C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:i
n `require'
        from C:/ruby/rails_apps/alpha/config/environment.rb:11
        from C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:i
n `gem_original_require'
        from C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:i
n `require'
        from C:/ruby/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-
mswin32/bin/.
./lib/mongrel/rails.rb:147:in `rails'
        from C:/ruby/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-
mswin32/bin/m
ongrel_rails:113:in `cloaker_'
        from C:/ruby/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-
mswin32/bin/.
./lib/mongrel/configurator.rb:149:in `call'
         ... 6 levels...
        from C:/ruby/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-
mswin32/bin/.
./lib/mongrel/command.rb:212:in `run'
        from C:/ruby/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-
mswin32/bin/m
ongrel_rails:281
        from C:/ruby/ruby/bin/mongrel_rails:19:in `load'
        from C:/ruby/ruby/bin/mongrel_rails:19

Next I tried ruby script/server instead, and got something similar,
though not as menacing in length:

./script/../config/boot.rb:28: undefined method `require_gem' for
main:Object (N
oMethodError)
        from C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:i
n `gem_original_require'
        from C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:i
n `require'
        from script/server:2

I tried reinstalling ruby, Instant_Rails, and installed the Ruby Gems
version that was bundled with the app (rubygems-0.9.0). I retrieved
the app via FTP, Filezilla. My job is to make changed to the website.
I was hoping I could get the app up and running locally, unchanged,
before I made any changes. However these errors have shut me down. Any
help on how I can get this up and running locally (or how I screwed
up) would be greatly appreciated. Thanks.

Next I tried ruby script/server instead, and got something similar,
though not as menacing in length:

./script/../config/boot.rb:28: undefined method `require_gem' for
main:Object (N
oMethodError)
from C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:i
n `gem_original_require'
from C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:i
n `require'
from script/server:2

I tried reinstalling ruby, Instant_Rails, and installed the Ruby Gems
version that was bundled with the app (rubygems-0.9.0). I retrieved
the app via FTP, Filezilla. My job is to make changed to the website.
I was hoping I could get the app up and running locally, unchanged,
before I made any changes. However these errors have shut me down. Any
help on how I can get this up and running locally (or how I screwed
up) would be greatly appreciated. Thanks.

require_gem is a rubygems method that was obsoleted and later removed.
However your rails 1.1.6 app (or more correctly, the boot.rb script it
contains) is old enough that it still uses require_gem, which was fair
play at the time. require_gem was renamed to just gem, if you make
those replacements in boot.rb that would probably be a start.

Fred

Thanks a lot. That fixed Mongrel. It runs through and starts now.
However I still don't have much of a clue about how to run the website
locally. While I have mongrel up I enter: "http://localhost:3000/ "
but I don't know what to put afterwards. The tutorials I've looked at
say to put the name of a table from the database. Though I doubted
that would work, I tried it, and of course it didn't work. I just get
a routing error.

Just a name of one of the controllers should do it (or any routes
defined in routes.rb) (often enough this will correspond to a model
and therefore a table).

Fred

Thank you so much. Much <3