teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

コードの追加。

2020/08/25 02:05

投稿

ynaoto
ynaoto

スコア0

title CHANGED
File without changes
body CHANGED
@@ -6,7 +6,47 @@
6
6
 
7
7
  herokuのログでは ActionController::RoutingError (uninitialized constant Users):
8
8
  となっており、以下に画像を載せておきます。
9
+ ちなみにroute.rbは以下のようになっています。
10
+ ```ruby
11
+ Rails.application.routes.draw do
12
+ devise_for :users, controllers: { omniauth_callbacks: 'users/omniauth_callbacks' }
13
+ root 'home#top'
14
+ # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
15
+ get 'home/:item_id/confirm' => 'home#confirm'
9
16
 
17
+ get 'item/result' => 'item#result'
18
+ get 'item/index' => 'item#index'
19
+ get 'item/:item_id/show' => 'item#show'
20
+ get 'item/:item_id/edit' => 'item#edit'
21
+ put 'item/:item_id/update' => 'item#update'
22
+ patch 'item/:item_id/update' => 'item#update'
23
+ put 'item/:item_id/finish' => 'item#finish'
24
+ patch 'item/:item_id/finish' => 'item#finish'
25
+ resources :item, only: [:new, :create, :destroy]
26
+
27
+ get 'userpage/:id/show' => 'userpage#show'
28
+ get 'userpage/mypage' => 'userpage#mypage'
29
+ get 'userpage/:id/edit' => 'userpage#edit'
30
+ put 'userpage/:id/update' => 'userpage#update'
31
+ patch 'userpage/:id/update' => 'userpage#update'
32
+ get 'userpage/myitem' => 'userpage#myitem'
33
+ get 'userpage/BoughtItem' => 'userpage#BoughtItem'
34
+
35
+
36
+ get 'stock/:id/show' => 'stock#show'
37
+ post 'stock/:item_id/create' => 'stock#create'
38
+ post 'stock/:item_id/destroy' => 'stock#destroy'
39
+ post 'stock/:item_id/dfromuser' => 'stock#dfromuser'
40
+
41
+
42
+ post 'room/:item_id/create' => 'room#create'
43
+ get 'room/:item_id/show' => 'room#show'
44
+ delete 'room/:item_id/destroy' => 'room#destroy'
45
+
46
+ post 'message/:item_id/create' => 'message#create'
47
+ end
48
+ ```
49
+
10
50
  vscodeのdevise.rb下にも以下のように書かれています。(api_keyなどは隠しています。)
11
51
  ```ruby on rails
12
52
  config.omniauth :twitter, 'key', 'secret', scope: 'email', callback_url: "https://texross.herokuapp.com/users/auth/twitter/callback"

1

エラーコードを追加

2020/08/25 02:05

投稿

ynaoto
ynaoto

スコア0

title CHANGED
File without changes
body CHANGED
@@ -4,6 +4,9 @@
4
4
  起きている状況としては、画像のようなものですが、一度ツイッターログイン画面に移るものの、その後二枚目の画像のようにエラーが出てしまいます。herokuでのデプロイ済です。
5
5
  callback_urlに問題があるように思われますが、twitterdevelopperにも、https://texross.herokuapp.com/users/auth/twitter/callback
6
6
 
7
+ herokuのログでは ActionController::RoutingError (uninitialized constant Users):
8
+ となっており、以下に画像を載せておきます。
9
+
7
10
  vscodeのdevise.rb下にも以下のように書かれています。(api_keyなどは隠しています。)
8
11
  ```ruby on rails
9
12
  config.omniauth :twitter, 'key', 'secret', scope: 'email', callback_url: "https://texross.herokuapp.com/users/auth/twitter/callback"
@@ -12,5 +15,5 @@
12
15
 
13
16
  ![イメージ説明](0fac60c3300a942549531ff9d64b50ad.png)
14
17
  ![イメージ説明](cc557fd271b25af7c8aa017bf0ba74c3.png)
15
-
18
+ ![イメージ説明](53751d2775b0c7c0f74397b3d7bf8ed0.png)
16
19
  問題点が分かる方、返信をお願いいたします。