我正在使用Ruby 1.9.3和Rails 2.3.18。
输入rails server
运行ruby script/server
时出现此错误:
Latitude-3540:/var/www/html/siteman$ ruby script/server
NOTE: Gem.source_index is deprecated, use Specification. It will be
removed on or after 2011-11-01.
Gem.source_index called from /var/www/html/siteman/vendor/rails/railties/lib/rails/gem_dependency.rb:21.
config.gem: Unpacked gem ihunter-whatcounts-0.4.0 in vendor/gems has a mismatched specification file. Run 'rake gems:refresh_specs'
to fix this.
/var/www/html/siteman/vendor/rails/activesupport/lib/active_support/inflector.rb:3:in
`<top (required)>': iconv will be deprecated in the future, use
String#encode instead.
=> Booting WEBrick
=> Rails 2.3.18 application starting on http://0.0.0.0:3000
config.load_paths is deprecated and removed in Rails 3, please use autoload_paths instead
config.load_paths= is deprecated and removed in Rails 3, please use autoload_paths= instead
[FSTR] Using Red Five FileStorage version 0.1
/var/www/html/siteman/config/initializers/siteman.rb:23:in `chdir': No such file or directory - /var/www/html/siteman/presents
(Errno::ENOENT)
from /var/www/html/siteman/config/initializers/siteman.rb:23:in `<top (required)>'
from /var/www/html/siteman/vendor/rails/activesupport/lib/active_support/dependencies.rb:171:in
`load'
from /var/www/html/siteman/vendor/rails/activesupport/lib/active_support/dependencies.rb:171:in
`block in load_with_new_constant_marking'
from /var/www/html/siteman/vendor/rails/activesupport/lib/active_support/dependencies.rb:547:in
`new_constants_in'
from /var/www/html/siteman/vendor/rails/activesupport/lib/active_support/dependencies.rb:171:in
`load_with_new_constant_marking'
from /var/www/html/siteman/vendor/rails/railties/lib/initializer.rb:622:in
`block in load_application_initializers'
from /var/www/html/siteman/vendor/rails/railties/lib/initializer.rb:621:in
`each'
from /var/www/html/siteman/vendor/rails/railties/lib/initializer.rb:621:in
`load_application_initializers'
from /var/www/html/siteman/vendor/rails/railties/lib/initializer.rb:176:in
`process'
from /var/www/html/siteman/vendor/rails/railties/lib/initializer.rb:113:in
`run'
from /var/www/html/siteman/config/environment.rb:9:in `<top (required)>'
from /var/www/html/siteman/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in
`require'
from /var/www/html/siteman/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in
`block in require'
from /var/www/html/siteman/vendor/rails/activesupport/lib/active_support/dependencies.rb:547:in
`new_constants_in'
from /var/www/html/siteman/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in
`require'
from /var/www/html/siteman/config.ru:2:in `block in <top (required)>'
from /var/www/html/siteman/vendor/bundle/ruby/1.9.1/gems/rack-1.1.6/lib/rack/builder.rb:46:in
`instance_eval'
from /var/www/html/siteman/vendor/bundle/ruby/1.9.1/gems/rack-1.1.6/lib/rack/builder.rb:46:in
`initialize'
from /var/www/html/siteman/config.ru:1:in `new'
from /var/www/html/siteman/config.ru:1:in `<top (required)>'
from /var/www/html/siteman/vendor/rails/railties/lib/commands/server.rb:78:in
`eval'
from /var/www/html/siteman/vendor/rails/railties/lib/commands/server.rb:78:in
`<top (required)>'
from script/server:3:in `require'
from script/server:3:in `<main>'