Facing error while running rails2 project

Hi I am working with the following code , but getting an error

ruby script/server
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning:
Gem::Dependency#version_requirements is deprecated and will be removed
on or after August 2010. Use #requirement
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:440:in
`load_missing_constant': uninitialized constant Earth::Db (NameError)
  from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in
`const_missing'
  from /root/mysite/webapp/config/environments/development.rb:66:in
`load_environment'
  from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/rails-2.3.5/lib/initializer.rb:386:in
`load_environment'
  from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb:11:in
`silence_warnings'
  from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/rails-2.3.5/lib/initializer.rb:379:in
`load_environment'
  from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/rails-2.3.5/lib/initializer.rb:137:in
`process'
  from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/rails-2.3.5/lib/initializer.rb:113:in
`send'
  from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/rails-2.3.5/lib/initializer.rb:113:in
`run'
  from /root/mysite/webapp/config/environment.rb:11
  from
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
`gem_original_require'
  from
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
`require'
  from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
  from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
`new_constants_in'
  from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'
  from /root/mysite/webapp/config.ru:4
  from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/rack-1.0.1/lib/rack/builder.rb:29:in
`instance_eval'
  from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/rack-1.0.1/lib/rack/builder.rb:29:in
`initialize'
  from /root/mysite/webapp/config.ru:1:in `new'
  from /root/mysite/webapp/config.ru:1
  from
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
`eval'
  from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/rails-2.3.5/lib/commands/server.rb:78
  from
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
`gem_original_require'
  from
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
`require'
  from script/server:3

Can some one Please help me to understand what needs to be corrected to
make it runnable.

Hi I am working with the following code , but getting an error

ruby script/server
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning:
Gem::Dependency#version_requirements is deprecated and will be removed
on or after August 2010. Use #requirement

That is just a warning, I would not worry about it for the moment,
sort out the errors first.

/usr/local/rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:440:in
`load_missing_constant': uninitialized constant Earth::Db (NameError)
from
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in
`const_missing'
from /root/mysite/webapp/config/environments/development.rb:66:in

It is often not easy to see the important line in a stack trace, look
for one that references some of your code. In this case the problem
is at line 66 of the file above. Have a look at line 66 and see what
it says, possibly it is trying to use a gem that you have not
installed.

Colin

Hi Colin,

Thanks for replying. I checked the line number you said to and it
contains
something like this.

CACHE = Earth::Db::Base.cache_manager =
Earth::Db::MemcacheManager.new('localhost:11211')

I did install the memcache gem. Any ideas how to solve this as I am a
newbie in Rails.

Colin Law wrote in post #1046490:

Hi I am working with the following code , but getting an error

ruby script/server
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000

/usr/local/rvm/gems/ruby-1.8.7-p357/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning:

Gem::Dependency#version_requirements is deprecated and will be removed
on or after August 2010. Use #requirement

That is just a warning, I would not worry about it for the moment,
sort out the errors first.

/usr/local/rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:440:in

`load_missing_constant': uninitialized constant Earth::Db (NameError)
from

/usr/local/rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in

Could you not top post please, it makes it difficult to follow the
thread. Insert your reply at appropriate points in the previous
message, thanks.

Hi Colin,

Thanks for replying. I checked the line number you said to and it
contains
something like this.

CACHE = Earth::Db::Base.cache_manager =
Earth::Db::MemcacheManager.new('localhost:11211')

I did install the memcache gem. Any ideas how to solve this as I am a
newbie in Rails.

That looks a rather complex line for a newbie in Rails to be using. I
hope you have worked through some rails tutorials before jumping in at
the deep end. railstutorial.org is good and is free to use online.
If you look again at the error it is complaining about Earth::Db. I
have not idea what that is, hopefully you do. It is probably wherever
that is supposed to come from that is missing.

Colin