浏览 4923 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2008-01-30
Wed Jan 30 15:16:57 +0800 2008: Read error: #<Errno::ECONNABORTED: 您的主机中的软件放弃了一个已建立 的连接。> d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel/http_response.rb:137:in `write' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel/http_response.rb:137:in `write' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel/http_response.rb:95:in `send_he ader' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel/http_response.rb:146:in `finish ed' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel.rb:165:in `process_client' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel.rb:285:in `run' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel.rb:285:in `initialize' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel.rb:285:in `new' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel.rb:285:in `run' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel.rb:268:in `initialize' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel.rb:268:in `new' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel.rb:268:in `run' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel/configurator.rb:282:in `run' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel/configurator.rb:281:in `each' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel/configurator.rb:281:in `run' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/bin/mongrel_rails:128:in `run' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/lib/mongrel/command.rb:212:in `run' d:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-x86-mswin32/bin/mongrel_rails:281 d:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load' d:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load' d:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_co nstants_in' d:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load' d:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/mongrel.rb:64 d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' d:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `requir e' d:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_co nstants_in' d:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `requir e' d:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39 d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' 读一个url要生成一个静态文件,控制器里写个方法调用下面的方法把url内容拿到 存文件。 def get_url_content url #o = open("http://www.baidu.com") o = open(url) c = o.read(o.size) o.close c end 问题: 如果传进来的url地址是本服务器(就是当前服务器)的url,会出现《您的主机中的软件放弃了一个已建立》的错误。 如果是别的url例如 http://www.baidu.com 就会没有问题 在一个控制器正在调用一个action的时候,不能open本服务器的url 难道是rails的bug么? 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2008-01-30
只开了一个mongrel吧,单进程请求deadlock,请搜索论坛相关内容
|
|
返回顶楼 | |
发表时间:2008-01-30
Readonly 写道 只开了一个mongrel吧,单进程请求deadlock,请搜索论坛相关内容
生成静态页面一般有两种吧 一种是用一楼的方式 一种是用render_to_string()方法 但是多个参数不知道怎么去传, 例如http://127.0.0.1/vault/tag/dianying?area=dalu&page=184, 后边的dianying?area=dalu&page=184,这几个参数用render_to_string怎么写呢? 有没有下面方式,谢谢 render_to_string(:action =>"/vault/tag/#{m}",:params=>{:area=>c,:page=>pa}) |
|
返回顶楼 | |