preloader
軟體工程

Grape-rails-routes gem的使用疑問

It’s handy to use Grape-rails-routes gem. But I have a question about that. Why should I need to open the routing page localhost:3000/rails/info/routes_with_grape of grape-rails-routes gem first after I launching rails service and before using OAuth clients? If I don’t do this, my Oauth clients can’t access API services even access tokens in my clients are valid. README.markdown of Grape-rails-routes doesn’t mention that. Until now, I still find no answer about it.

Grape-rails-routes gem很容易上手,不過我有一個使用上的問題。那就是,為什麼我必須在啟動rails server之後且在開始使用Grape gem搭建的API服務之前,要率先開啟Grape-rails-routes的特定網頁,例如在本機開發時須先開啟localhost:3000/rails/info/routes_with_grape ,我的OAuth client 才能正常存取到API服務,即便我的client使用的access token仍在有效時間內。目前為止,我仍找不到答案,太神秘了。