paths need to start with / (ArgumentError)

China☆狼群 提交于 2020-01-06 08:45:08

问题


This question is similar to that of Neil Hoff's post from a few days ago. I downloaded Ruby On Rails using Helicon Zoo's ruby package. I am running this on Windows 7 using IIS Express & WebMatrix.

Like, the other question when I browse to the site, I am getting the following:

[tid-12570000] paths need to start with / (ArgumentError)
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.3.6/lib/rack/urlmap.rb:33:in `block in remap'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.3.6/lib/rack/urlmap.rb:25:in `each'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.3.6/lib/rack/urlmap.rb:25:in `map'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.3.6/lib/rack/urlmap.rb:25:in `remap'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.3.6/lib/rack/urlmap.rb:18:in `initialize'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:128:in `new'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:128:in `to_app'
C:/ZooExpress/Workers/ruby/lib/app.rb:45:in `build_app'
C:/ZooExpress/Workers/ruby/lib/app.rb:16:in `initialize'
C:/ZooExpress/Workers/ruby/lib/worker.rb:4:in `new'
C:/ZooExpress/Workers/ruby/lib/worker.rb:4:in `initialize'
C:/ZooExpress/Workers/ruby/zoorack.rb:30:in `new'
C:/ZooExpress/Workers/ruby/zoorack.rb:30:in `<module:Zack>'
C:/ZooExpress/Workers/ruby/zoorack.rb:12:in `<main>'

I know that RoR on Windows does not have a big following, but have searched for the past 2 days for a solution to this, and via google, the only remotely related text seems to be the other SO question referred to above without an answer. Anyone got any ideas?


回答1:


Your bug come from rack. I think he search a url like this : http://localhost/. To know what he do, I suggest you to go in this file : C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.3.6/lib/rack/urlmap.rb and change the code to see what's the value of location. You can try to debug your code with pry or ruby-debug. I know, it's difficult. I have no better answer for the moment. Gool luck!




回答2:


Please upgrade Helicon Zoo Module from the feed to the version 1.0.0.47 or higher. Just go to Zoo -> Modules and install it again.



来源:https://stackoverflow.com/questions/11595286/paths-need-to-start-with-argumenterror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!