About ruby -d script/server

any ruby and any rails ,when using ruby -d script/server,appear a lot of
errors as follow.Maybe It does not affect application running,but I feel
uncomfortable .Who can solve it.thanks.

:
ruby -d script/server
Exception LoadError' at /home/saq/app/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:871 - no such file to load -- rubygems/defaults/operating_system Exception NoMethodError’ at
/home/saq/app/ruby/lib/ruby/1.8/rational.rb:78 - undefined method gcd' for Rational(1, 2):Rational Exception LoadError’ at
/home/saq/app/ruby/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:35 -
no such file to load – Win32API
Exception TypeError' at (eval):4 - can't modify frozen object Exception MissingSourceFile’ at
/home/saq/app/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31

  • no such file to load – fast_xs
    Exception `MissingSourceFile’ at
    /home/saq/app/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:38
  • no such file to load – fast_xs
    Exception `MissingSourceFile’ at
    /home/saq/app/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31
  • no such file to load – thin
    Exception `MissingSourceFile’ at
    /home/saq/app/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31
  • no such file to load – mongrel
    Exception `MissingSourceFile’ at
    /home/saq/app/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31
  • no such file to load – Win32API
    Exception `MissingSourceFile’ at
    /home/saq/app/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:38
  • no such file to load – Win32API
    Exception `MissingSourceFile’ at
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:162
  • no such file to load – Win32API
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/cgi.rb:165:
    warning: method redefined; discarding old env_table
    Exception `MissingSourceFile’ at
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/gems.rb:7
  • no such file to load – mongrel_experimental
    Exception `Gem::LoadError’ at
    /home/saq/app/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:636 - Could not
    find RubyGem mongrel_experimental (>= 1.1.5)

=> Booting Mongrel
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
Exception Errno::EEXIST' at /home/saq/app/ruby/lib/ruby/1.8/fileutils.rb:243 - File exists - /home/saq/app/myapp/tmp/cache Exception Errno::EEXIST’ at
/home/saq/app/ruby/lib/ruby/1.8/fileutils.rb:243 - File exists -
/home/saq/app/myapp/tmp/pids
Exception Errno::EEXIST' at /home/saq/app/ruby/lib/ruby/1.8/fileutils.rb:243 - File exists - /home/saq/app/myapp/tmp/sessions Exception Errno::EEXIST’ at
/home/saq/app/ruby/lib/ruby/1.8/fileutils.rb:243 - File exists -
/home/saq/app/myapp/tmp/sockets
/home/saq/app/myapp/config/boot.rb:8: warning: method redefined;
discarding old boot!
/home/saq/app/myapp/config/boot.rb:15: warning: method redefined;
discarding old booted?
/home/saq/app/myapp/config/boot.rb:19: warning: method redefined;
discarding old pick_boot
/home/saq/app/myapp/config/boot.rb:23: warning: method redefined;
discarding old vendor_rails?
/home/saq/app/myapp/config/boot.rb:27: warning: method redefined;
discarding old preinitialize
/home/saq/app/myapp/config/boot.rb:31: warning: method redefined;
discarding old preinitializer_path
/home/saq/app/myapp/config/boot.rb:37: warning: method redefined;
discarding old run
/home/saq/app/myapp/config/boot.rb:44: warning: method redefined;
discarding old load_initializer
/home/saq/app/myapp/config/boot.rb:52: warning: method redefined;
discarding old load_initializer
/home/saq/app/myapp/config/boot.rb:58: warning: method redefined;
discarding old load_rails_gem
/home/saq/app/myapp/config/boot.rb:70: warning: method redefined;
discarding old rubygems_version
/home/saq/app/myapp/config/boot.rb:74: warning: method redefined;
discarding old gem_version
/home/saq/app/myapp/config/boot.rb:84: warning: method redefined;
discarding old load_rubygems
/home/saq/app/myapp/config/boot.rb:97: warning: method redefined;
discarding old parse_gem_version
/home/saq/app/myapp/config/boot.rb:102: warning: method redefined;
discarding old read_environment_rb
Exception `Gem::LoadError’ at
/home/saq/app/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:636 - Could not
find RubyGem tmail (~> 1.2.3)

Exception `MissingSourceFile’ at
/home/saq/app/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31

  • no such file to load – tmail/tmailscanner
    Exception `MissingSourceFile’ at
    /home/saq/app/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:38
  • no such file to load – tmail/tmailscanner
    Exception `MissingSourceFile’ at
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:162
  • no such file to load – tmail/tmailscanner
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756:
    warning: instance variable @reload_plugins not initialized
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/validations.rb:312:
    warning: *' interpreted as argument prefix /home/saq/app/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/dirty.rb:40: warning: *’ interpreted as argument prefix
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/callbacks.rb:228:
    warning: *' interpreted as argument prefix /home/saq/app/ruby/lib/ruby/1.8/erb.rb:788: warning: method redefined; discarding old html_escape Exception Gem::LoadError’ at
    /home/saq/app/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:636 - Could not
    find RubyGem activerecord-mysql-adapter (>= 0)

/home/saq/app/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/helpers/translation_helper.rb:24:
warning: *' interpreted as argument prefix /home/saq/app/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/base.rb:290: warning: method redefined; discarding old template /home/saq/app/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_view/template.rb:61: warning: instance variable @loaded not initialized /home/saq/app/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/translation.rb:4: warning: *’ interpreted as argument prefix
/home/saq/app/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/translation.rb:9:
warning: *' interpreted as argument prefix /home/saq/app/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/routing/routing_ext.rb:2: warning: method redefined; discarding old to_param /home/saq/app/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/routing/recognition_optimisation.rb:55: warning: method redefined; discarding old recognize_path /home/saq/app/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:84: warning: given block not used /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:304: warning: global variable $gems_build_rake_task’ not initialized
Exception Errno::EEXIST' at /home/saq/app/ruby/lib/ruby/1.8/fileutils.rb:243 - File exists - /home/saq/app/myapp/tmp/attachment_fu Exception NameError’ at
/home/saq/app/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:443

  • uninitialized constant Merb
    /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:304:
    warning: global variable $gems_build_rake_task' not initialized /home/saq/app/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/session_store.rb:181: warning: method redefined; discarding old connection /home/saq/app/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:388: warning: global variable $rails_rake_task’ not initialized
    => Call with -d to detach
    => Ctrl-C to shutdown server

On May 12, 2010, at 09:29 , Anqi Su wrote:

any ruby and any rails ,when using ruby -d script/server,appear a lot of
errors as follow.Maybe It does not affect application running,but I feel
uncomfortable .Who can solve it.thanks.

you can’t solve it. rails just sucks that way.

Ryan D. wrote:

you can’t solve it. rails just sucks that way.

Specifically: ruby -d shows you caught exceptions.

$ ruby -d
begin
raise “Normal exception”
rescue
end
puts “All OK”
^D
Exception `RuntimeError’ at -:2 - Normal exception
All OK

Perhaps what you really wanted is ‘ruby script/server -d’, which runs
the web server in daemon mode rather than running the ruby interpreter
in debug mode?

-Jonathan N.