【发布时间】:2021-01-22 01:03:29
【问题描述】:
我已经设置了一个使用 Turbo 的本地 Rails 应用程序。我正在尝试填充 the Turbo Demo iOS app 以显示我的本地 Rails 应用程序。有没有人能做类似的事情?
我将Demo.current 切换为使用本地地址,但所有请求都显示“加载页面错误”屏幕,演示应用程序中没有有用的日志。
Rails 应用程序显示我正在尝试的基本路线,并通过某种形式的持久性重试 401 错误。我更改了SceneController 默认 URL 以加载/networks/all-people,这需要授权用户(通过设计)才能看到身份验证逻辑将如何进行。下面是运行 Demo 应用时的 Rails 输出:
Started GET "/networks/all-people" for 127.0.0.1 at 2021-01-21 19:50:26 -0500
Processing by NetworksController#all_people as HTML
Completed 401 Unauthorized in 0ms (Allocations: 256)
Started GET "/users/sign_in" for 127.0.0.1 at 2021-01-21 19:50:26 -0500
Processing by Devise::SessionsController#new as HTML
Rendering layout layouts/application.html.erb
Rendering devise/sessions/new.html.erb within layouts/application
Rendered devise/shared/_links.html.erb (Duration: 0.3ms | Allocations: 218)
Rendered devise/sessions/new.html.erb within layouts/application (Duration: 1.7ms | Allocations: 1056)
Rendered layout layouts/application.html.erb (Duration: 9.4ms | Allocations: 7318)
Completed 200 OK in 10ms (Views: 9.8ms | Allocations: 7945)
有没有人能够让 Demo 应用程序与本地 Rails 服务器一起工作?我完全不确定这里出了什么问题,或者这里匀场是否是个好主意。
Turbo 正在加载,从我的浏览器访问时触发以下事件侦听器验证。
<script>
document.addEventListener("turbo:load", function(e) {
console.log("TURBO LOADED");
});
</script>
【问题讨论】:
标签: ruby-on-rails ruby devise hotwire-rails