Capybara visit url from s rails console

19 views
Skip to first unread message

fugee ohu

unread,
Dec 26, 2018, 4:57:49 PM12/26/18
to Ruby on Rails: Talk
When I try to run `visit <url>` from rails console rails complains so such route, of course there's no supposed to be since I'm not requesting a page on my app

Rob Zolkos

unread,
Dec 27, 2018, 9:43:00 AM12/27/18
to rubyonra...@googlegroups.com
On the rails console try app.get('/') (replace the string with a
path) eg app.get('/about')

On Wed, Dec 26, 2018 at 4:58 PM fugee ohu <fuge...@gmail.com> wrote:
>
> When I try to run `visit <url>` from rails console rails complains so such route, of course there's no supposed to be since I'm not requesting a page on my app
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e1be48ea-1251-487d-a1b6-967e3c044c5c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

fugee ohu

unread,
Dec 27, 2018, 12:33:39 PM12/27/18
to Ruby on Rails: Talk
I tried that with an absolute url beginning with https://..., rails still complains that there's no such route The syntax you gave me is for within my app I'm trying to request a site out on the web

Hassan Schroeder

unread,
Dec 27, 2018, 12:43:34 PM12/27/18
to rubyonrails-talk
On Thu, Dec 27, 2018 at 9:33 AM fugee ohu <fuge...@gmail.com> wrote:

> I'm trying to request a site out on the web

Maybe google `ruby http client` ?

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
Reply all
Reply to author
Forward
0 new messages