Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010
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:in
new'
from /usr/lib/ruby/1.8/webrick/utils.rb:73:in create_listeners'
from /usr/lib/ruby/1.8/webrick/utils.rb:70:in
each'
from /usr/lib/ruby/1.8/webrick/utils.rb:70:in create_listeners'
from /usr/lib/ruby/1.8/webrick/server.rb:75:in
listen'
from /usr/lib/ruby/1.8/webrick/server.rb:63:in initialize'
from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in
initialize'
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:in
run'
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:in
require'
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
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
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)
You would eliminate this problem if you make sure to stop webrick instances that you are not using. Make sure that you never damonize or background a webrick instance as this makes it difficult to stop without killing the process. A good rule is to have a terminal session dedicated to starting and stopping webrick that way you never lose track of webrick instances.
精彩评论