Installed gem payanyway ( https://github.com/ssnikolay/payanyway ) After the payment was successful, the page / success opens, and there Routing Error.

Rails.application.routes.draw do mount Payanyway::Engine => '/payanyway' .... end 

rake routes

 Routes for Payanyway::Engine payanyway_on_success_path GET /success(.:format) payanyway#success payanyway_pay_path GET /pay(.:format) payanyway#pay payanyway_on_fail_path GET /fail(.:format) payanyway#fail payanyway_on_return_path GET /return(.:format) payanyway#return payanyway_in_progress_path GET /in_progress(.:format) payanyway#in_progress payanyway_on_check_path GET /check(.:format) payanyway#check 

If I insert a link to one of these pages somewhere, I get an error:

 undefined local variable or method `payanyway_on_success_path' 

How to solve this problem and where to look for the error?

    1 answer 1

    Using the mount method, you mounted Engine to the payanyway path. This means that all routes defined in the Engine will begin with payanyway . The success page will be available at /payanyway/success . And the route helpers will be added with the payanyway prefix. The helper leading to success will look like payanyway_payanyway_on_success_path .

    UPD

    I forgot to write a solution.

    mount Payanyway::Engine => '/'

    • Thank you) I also had the wrong way on the site moneta.ru Read more in github - user3524864