views:

100

answers:

2

When i'm running ruby script/server webrick -e production

it gives error

=> Booting WEBrick => Rails 2.3.5 application starting on http://0.0.0.0:3000 /usr/lib64/ruby/gems/1.8/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 => Call with -d to detach => Ctrl-C to shutdown server [2010-10-16 11:37:00] INFO WEBrick 1.3.1 [2010-10-16 11:37:00] INFO ruby 1.8.6 (2010-02-05) [x86_64-linux] [2010-10-16 11:37:00] WARN TCPServer Error: Address already in use - bind(2) Exiting /usr/lib/ruby/1.8/webrick/utils.rb:73:in initialize': Address already in use - bind(2) (Errno::EADDRINUSE) from /usr/lib/ruby/1.8/webrick/utils.rb:73:innew' from /usr/lib/ruby/1.8/webrick/utils.rb:73:in create_listeners' from /usr/lib/ruby/1.8/webrick/utils.rb:70:ineach' from /usr/lib/ruby/1.8/webrick/utils.rb:70:in create_listeners' from /usr/lib/ruby/1.8/webrick/server.rb:75:inlisten' from /usr/lib/ruby/1.8/webrick/server.rb:63:in initialize' from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:ininitialize' from /usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:10:in new' from /usr/lib64/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:10:inrun' from /usr/lib64/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:111 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' from script/server:3

Using ruby 1.8.6 (2010-02-05 patchlevel 399) [x86_64-linux] Rails 2.3.5 gem --version 1.3.7

Tried for gem update --system gem install rubygems-update update_rubygems

still getting error

I have also done this gem install -v=2.3.8 rails

still getting error

A: 

Sounds like you already have a rails server (or something else) already listening on TCP/3000. You'll need to either stop your other server or start this one on a different port:

$ ruby script/server webrick -e production -p 3001
Eric Dennis
It works occasionally. When i'm restart redime it dosen't work. why?
Ankit Shah
Are you running redmine on port 3000? If so, then that's why. Different processes can't bind to the same address/port simultaneously.
Eric Dennis
Ankit Shah
A: 

It works occasionally. When i'm restart redime it dosen't work. why?

When i'have changed port to 3001 it works but when i restart redmine it sill get same error.

When i tried to do

rake gems:install

It gives (in /var/www/html/redmine) rake aborted! Access denied for user 'root'@'localhost' (using password: NO)

(See full trace by running task with --trace)

Ankit Shah