質問編集履歴

7

文章変更。

2020/01/24 13:50

投稿

takahira0425
takahira0425

スコア5

test CHANGED
File without changes
test CHANGED
@@ -118,7 +118,7 @@
118
118
 
119
119
 
120
120
 
121
-     〜省略
121
+ 省略
122
122
 
123
123
 
124
124
 
@@ -172,79 +172,7 @@
172
172
 
173
173
 
174
174
 
175
- まったくエラーが解決しなので、いくつか関連サイトを参考に以下のことを実施しました。(時系列順ではないです。)
175
+ いくつか関連サイトを参考に以下のことを実施しました。
176
-
177
-
178
-
179
- ・ $git init→ $git add .→ $git commit -m "new commit"
180
-
181
- → $git push heroku masterを入力。
182
-
183
- ・ 設定ファイル作成
184
-
185
- runtime.txt
186
-
187
- requirements.txt
188
-
189
- Procfile
190
-
191
- ・ 上記の設定ファイルをディレクトリ直下に置く。
192
-
193
- ・ HEROKUのBuildpacksに、python、ruby、nodejsを追加。
194
-
195
- ・ HEROKUのConfig VarsにKEYとVALUEを入力。
196
-
197
- ・ $git push origin HEADを入力。
198
-
199
- ・ $heroku git:remote -a linebot-simpleapp(アプリ名)を入力。
200
-
201
- ・ $pip3 install line-bot-sdkを入力
202
-
203
- ・ $pip3 install flaskを入力
204
-
205
- ・ $bundle installを入力
206
-
207
- ・ Gemfileに
208
-
209
- gem 'acts-as-taggable-on'
210
-
211
- gem 'bcrypt'
212
-
213
- gem 'carrierwave'追加
214
-
215
- ・ production.rbに config.assets.initialize_on_precompile = falseを追加。
216
-
217
- ・ database.ymlファイルを
218
-
219
- production:
220
-
221
- <<: *default
222
-
223
- database: myapp_production
224
-
225
- username: myapp
226
-
227
- password: <%= ENV['MYAPP_DATABASE_PASSWORD'] %>
228
-
229
- から
230
-
231
- production:
232
-
233
- <<: *default
234
-
235
- adapter: postgresql
236
-
237
- encoding: unicode
238
-
239
- pool: 5に変更
240
-
241
-
242
-
243
-
244
-
245
- (前回の修正後↓)
246
-
247
-
248
176
 
249
177
 
250
178
 

6

文章変更した。

2020/01/24 13:50

投稿

takahira0425
takahira0425

スコア5

test CHANGED
File without changes
test CHANGED
@@ -80,7 +80,7 @@
80
80
 
81
81
  Rubyを1番目に設定するとエラーが解消しましたが、git push heroku master入力後に別のエラーが表示されました。
82
82
 
83
- 修正試みしたが、完全に詰まっています。
83
+ webpackerインストールし、binフォルダも存在していが、デプロイできなくて完全に詰まっています。
84
84
 
85
85
  ```
86
86
 
@@ -240,10 +240,14 @@
240
240
 
241
241
 
242
242
 
243
+
244
+
243
245
  (前回の修正後↓)
244
246
 
245
247
 
246
248
 
249
+
250
+
247
251
  ・ bundle install --binstubs
248
252
 
249
253
  ・ bin/rails webpacker:binstubs

5

文章変更。

2020/01/24 08:38

投稿

takahira0425
takahira0425

スコア5

test CHANGED
File without changes
test CHANGED
@@ -1,8 +1,4 @@
1
- ```ここに言語を入力
2
-
3
- コード
4
-
5
- ```# 前提・実現したいこと
1
+ # 前提・実現したいこと
6
2
 
7
3
  プログラミング初心者・初投稿です。
8
4
 
@@ -172,7 +168,7 @@
172
168
 
173
169
  ```
174
170
 
175
- ### 試したこと
171
+ #### 試したこと
176
172
 
177
173
 
178
174
 
@@ -268,7 +264,7 @@
268
264
 
269
265
 
270
266
 
271
- #### 補足情報(FW/ツールのバージョンなど)
267
+ ##### 補足情報(FW/ツールのバージョンなど)
272
268
 
273
269
  python -varsion=3.6.5
274
270
 

4

新しいエラーについて記入した。

2020/01/24 08:31

投稿

takahira0425
takahira0425

スコア5

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,8 @@
1
+ ```ここに言語を入力
2
+
3
+ コード
4
+
1
- # 前提・実現したいこと
5
+ ```# 前提・実現したいこと
2
6
 
3
7
  プログラミング初心者・初投稿です。
4
8
 
@@ -74,7 +78,99 @@
74
78
 
75
79
  ```
76
80
 
77
-
81
+ ###
82
+
83
+ 指摘していただいたように、Buildpackの順番が間違っていました。
84
+
85
+ Rubyを1番目に設定するとエラーが解消しましたが、git push heroku master入力後に別のエラーが表示されました。
86
+
87
+ 修正を試みましたが、完全に詰まっています。
88
+
89
+ ```
90
+
91
+ owner@MA4-0082 myapp % git push heroku master
92
+
93
+ Enumerating objects: 92, done.
94
+
95
+ Counting objects: 100% (92/92), done.
96
+
97
+ Delta compression using up to 4 threads
98
+
99
+ Compressing objects: 100% (75/75), done.
100
+
101
+ Writing objects: 100% (92/92), 23.78 KiB | 1.49 MiB/s, done.
102
+
103
+ Total 92 (delta 2), reused 0 (delta 0)
104
+
105
+ remote: Compressing source files... done.
106
+
107
+ remote: Building source:
108
+
109
+ remote:
110
+
111
+ remote: -----> Ruby app detected
112
+
113
+ remote: -----> Compiling Ruby/Rails
114
+
115
+ remote: -----> Using Ruby version: ruby-2.5.1
116
+
117
+ remote: -----> Vendoring libpq 5.12.1
118
+
119
+ remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
120
+
121
+ remote: -----> Installing dependencies using bundler 2.0.2
122
+
123
+
124
+
125
+     〜省略〜
126
+
127
+
128
+
129
+ remote: I, [2020-01-24T08:00:33.476552 #1858] INFO -- : Writing /tmp/build_1d2ba40a5d4c9672da8ef3ad9a336f98/public/assets/manifest-cadda289ef9c70eaa0879a36e6263cb33f7523a16b3ef862e0b8609cdc2bdab1.js
130
+
131
+ remote: I, [2020-01-24T08:00:33.476817 #1858] INFO -- : Writing /tmp/build_1d2ba40a5d4c9672da8ef3ad9a336f98/public/assets/manifest-cadda289ef9c70eaa0879a36e6263cb33f7523a16b3ef862e0b8609cdc2bdab1.js.gz
132
+
133
+ remote: I, [2020-01-24T08:00:33.477028 #1858] INFO -- : Writing /tmp/build_1d2ba40a5d4c9672da8ef3ad9a336f98/public/assets/application-d0ff5974b6aa52cf562bea5921840c032a860a91a3512f7fe8f768f6bbe005f6.css
134
+
135
+ remote: I, [2020-01-24T08:00:33.477207 #1858] INFO -- : Writing /tmp/build_1d2ba40a5d4c9672da8ef3ad9a336f98/public/assets/application-d0ff5974b6aa52cf562bea5921840c032a860a91a3512f7fe8f768f6bbe005f6.css.gz
136
+
137
+ remote: webpack binstubs not found.
138
+
139
+ remote: Have you run rails webpacker:install ?
140
+
141
+ remote: Make sure the bin directory or binstubs are not included in .gitignore
142
+
143
+ remote: Exiting!
144
+
145
+ remote:
146
+
147
+ remote: !
148
+
149
+ remote: ! Precompiling assets failed.
150
+
151
+ remote: !
152
+
153
+ remote: ! Push rejected, failed to compile Ruby app.
154
+
155
+ remote:
156
+
157
+ remote: ! Push failed
158
+
159
+ remote: Verifying deploy...
160
+
161
+ remote:
162
+
163
+ remote: ! Push rejected to linebot-simpleapp.
164
+
165
+ remote:
166
+
167
+ To https://git.heroku.com/linebot-simpleapp.git
168
+
169
+ ! [remote rejected] master -> master (pre-receive hook declined)
170
+
171
+ error: failed to push some refs to 'https://git.heroku.com/linebot-simpleapp.git'
172
+
173
+ ```
78
174
 
79
175
  ### 試したこと
80
176
 
@@ -148,6 +244,28 @@
148
244
 
149
245
 
150
246
 
247
+ (前回の修正後↓)
248
+
249
+
250
+
251
+ ・ bundle install --binstubs
252
+
253
+ ・ bin/rails webpacker:binstubs
254
+
255
+ ・ bin/webpack
256
+
257
+ ・ bundle update --conservative webpacker
258
+
259
+ ・ rails webpacker:install:react
260
+
261
+ ・ npm install -g yarn
262
+
263
+ ・ yarn init
264
+
265
+ ・ nodebrew install-binary stable
266
+
267
+ ・ nodebrew use v12.14.1
268
+
151
269
 
152
270
 
153
271
  #### 補足情報(FW/ツールのバージョンなど)
@@ -159,3 +277,9 @@
159
277
  Homebrew -varsion=2.2.4
160
278
 
161
279
  pyenv -varsion=1.2.16
280
+
281
+ node =v12.14.1
282
+
283
+ yarn =1.21.1
284
+
285
+ npm =6.13.4

3

試したことに付け足した。

2020/01/24 08:30

投稿

takahira0425
takahira0425

スコア5

test CHANGED
File without changes
test CHANGED
@@ -80,7 +80,7 @@
80
80
 
81
81
 
82
82
 
83
- いくつか関連サイトを参考に以下のことを実施しました。(時系列順ではないです。)
83
+ まったくエラーが解決しなので、いくつか関連サイトを参考に以下のことを実施しました。(時系列順ではないです。)
84
84
 
85
85
 
86
86
 

2

補足情報を追加。

2020/01/24 04:54

投稿

takahira0425
takahira0425

スコア5

test CHANGED
File without changes
test CHANGED
@@ -155,3 +155,7 @@
155
155
  python -varsion=3.6.5
156
156
 
157
157
  ruby -varsion=2.5.1
158
+
159
+ Homebrew -varsion=2.2.4
160
+
161
+ pyenv -varsion=1.2.16

1

タイトルを変更した。

2020/01/24 04:52

投稿

takahira0425
takahira0425

スコア5

test CHANGED
@@ -1 +1 @@
1
- herokuへgit push heroku masterでエラーが出る。
1
+ herokuへデプロイしたいが、git push heroku masterでエラーが出る。
test CHANGED
File without changes