0

(Rails 4 / Ruby 2.0 / gem high_voltage (1.2.4))

我在我的桌面上以开发模式运行我的项目,具有: - 我在 /app/views/pages 中的静态 xxxxx.html.erb 页面我的路由定义:

  get 'home' => 'high_voltage/pages#show', :id => 'home'
  get 'about' => 'high_voltage/pages#show', :id => 'about'
  get 'page1' => 'high_voltage/pages#show', :id => 'page1'
  get 'page2' => 'high_voltage/pages#show', :id => 'page2'

从我的桌面 localhost:3000 运行,我可以得到我的静态页面(主页、关于...)

Started GET "/" for 127.0.0.1 at 2013-09-16 14:55:38 +0200
Processing by HighVoltage::PagesController#show as HTML
  Parameters: {"id"=>"home"}
  Rendered pages/home.html.haml within layouts/application (3.7ms)
http://0.0.0.0:3000  , I get to my about page
Started GET "/about" for 127.0.0.1 at 2013-09-16 15:01:31 +0200
Processing by HighVoltage::PagesController#show as HTML
  Parameters: {"id"=>"about"}
  Rendered pages/about.html.haml within layouts/application (3.2ms)

但是当从我的 iPhone 运行时,通过 Safari 浏览器 192.168.1.14:3000 中的 wifi 我无法获得相同的页面......

    Started GET "/" for 192.168.1.11 at 2013-09-16 15:04:34 +0200
Processing by HighVoltage::PagesController#show as HTML
  Parameters: {"id"=>"home"}
Completed 404 Not Found in 4ms
ActionController::RoutingError (No such page: home):

 192.168.1.14:3000/about
Started GET "/about" for 192.168.1.11 at 2013-09-16 15:03:39 +0200
Processing by HighVoltage::PagesController#show as HTML
  Parameters: {"id"=>"about"}
Completed 404 Not Found in 4ms
ActionController::RoutingError (No such page: about):

通过 bonjour 访问我的 iPhone 哪里错了?

感谢您的帮助

4

0 回答 0