简体   繁体   English

没有路由匹配[GET]“ /”(ActionController :: RoutingError)

[英]No route matches [GET] “/” (ActionController::RoutingError)

I have an application running on this url correctly 我有一个正确在此网址上运行的应用程序

http://workspace-username.c9users.io/?#/bookings

and i have my server running on port 8081. 我的服务器在端口8081上运行。

When i run my cucumber in line 当我排好cucumber

visit  http://workspace-username.c9users.io/?#/bookings 

it gives me the erorr: 它给了我错误:

   No route matches [GET] "/" (ActionController::RoutingError)

I just got suprised because, the application is running as well, but capybara can not get it. 我只是感到惊讶,因为该应用程序也正在运行,但是capybara无法获得它。 I have also tried 我也尝试过

visit  http://workspace-username.c9users.io:8081/?#/bookings 

but still got the same erorr 但仍然有同样的错误

When accessing external pages capybara needs to use a web driver other than racktest because racktest only talks to rack applications. 当访问外部页面时,水豚需要使用非机架测试的Web驱动程序,因为机架测试仅与机架应用程序通信。 To test the website you will want to use another driver like selenium. 要测试该网站,您将需要使用其他驱动程序,例如硒。

You could set the driver to selenium if you only need it for that test. 如果只需要该驱动程序,则可以将驱动程序设置为selenium。

Capybara.current_driver = :selenium

Or change the default driver when you configure rspec 或在配置rspec时更改默认驱动程序

Capybara.default_driver = :selenium

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ActionController :: RoutingError(没有路由与[GET]匹配 - ActionController::RoutingError (No route matches [GET] " ActionController :: RoutingError:没有路由与[GET]“ /”匹配 - ActionController::RoutingError: No route matches [GET] “/” ActionController :: RoutingError-没有路由匹配 - ActionController::RoutingError - No route matches ActionController :: RoutingError(没有路由匹配 - ActionController::RoutingError (No route matches CRUD ActionController :: RoutingError(没有路由与[GET]匹配 - CRUD ActionController::RoutingError (No route matches [GET] ActionController :: RoutingError(没有路由与[GET]“ / users”匹配): - ActionController::RoutingError (No route matches [GET] “/users”): 设计 - ActionController :: RoutingError(没有路由匹配[GET]“/ confirm”): - Devise - ActionController::RoutingError (No route matches [GET] “/confirm”): ActionController :: RoutingError没有与“ / cloudfoundryapplication”匹配的[GET]和[OPTION]路由 - ActionController::RoutingError No route matches [GET] & [OPTION] for “/cloudfoundryapplication” ActionController :: RoutingError(没有路由与[GET]“ / assets / images匹配 - ActionController::RoutingError (No route matches [GET] "/assets/images 回形针ActionController :: RoutingError:没有路线与[GET]匹配 - Paperclip ActionController::RoutingError: No route matches [GET]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM