agideo@ats1:~/apps/app_name$ ruby script/server -e production
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with production environment...
Exiting
/home/agideo/apps/app_name/vendor/rails/railties/lib/commands/servers/mongrel.rb:15: warning: already initialized constant OPTIONS
/home/agideo/apps/app_name/vendor/rails/railties/lib/commands/servers/mongrel.rb:18: undefined method `options' for []:Array (NoMethodError)
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in `require'
from /home/agideo/apps/app_name/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'
from /home/agideo/apps/app_name/vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
from /home/agideo/apps/app_name/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'
from /home/agideo/apps/app_name/vendor/rails/railties/lib/commands/server.rb:39
from script/server:3:in `require'
from script/server:3
运行时奇怪的 错误
网上的资料说缺少 gem
找出所有的 require 来
grep -rni '^require' ./*
对了N个小时 还是不行
最后无意中 ruby script/console production 试了一下,看到了
`gem_original_require': no such file to load -- action_web_service (MissingSourceFile)
晕啊.就是它
打开
vi config/environment.rb
加一句
config.frameworks -= [ :action_web_service ]
当然你也可以
gem install actionwebservice
终于可以睡觉了
rails 新的版本已经没有 action_web_service