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

質問編集履歴

5

修正

2020/09/14 14:10

投稿

keisuke.F
keisuke.F

スコア19

title CHANGED
File without changes
body CHANGED
@@ -348,11 +348,15 @@
348
348
  ```
349
349
 
350
350
  bundle --versionをローカルで打つと、
351
- ```Bundler version 2.1.4
352
351
  ```
352
+ Bundler version 2.1.4
353
+ ```
354
+
353
355
  ec2-userでの環境で打つと
354
- ```Bundler version 1.17.3
356
+
355
357
  ```
358
+ Bundler version 1.17.3
359
+ ```
356
360
 
357
361
 
358
362
  となっています。

4

修正

2020/09/14 14:10

投稿

keisuke.F
keisuke.F

スコア19

title CHANGED
File without changes
body CHANGED
@@ -345,4 +345,14 @@
345
345
  BUNDLED WITH
346
346
  2.1.4
347
347
 
348
- ```
348
+ ```
349
+
350
+ bundle --versionをローカルで打つと、
351
+ ```Bundler version 2.1.4
352
+ ```
353
+ ec2-userでの環境で打つと
354
+ ```Bundler version 1.17.3
355
+ ```
356
+
357
+
358
+ となっています。

3

2020/09/14 14:07

投稿

keisuke.F
keisuke.F

スコア19

title CHANGED
File without changes
body CHANGED
@@ -87,4 +87,262 @@
87
87
 
88
88
  ```
89
89
 
90
- よろしくお願い致します。
90
+ よろしくお願い致します。
91
+
92
+
93
+
94
+ 追記です。
95
+
96
+ gemfile.lock
97
+ ```
98
+ GEM
99
+ remote: https://rubygems.org/
100
+ specs:
101
+ actioncable (5.2.4.4)
102
+ actionpack (= 5.2.4.4)
103
+ nio4r (~> 2.0)
104
+ websocket-driver (>= 0.6.1)
105
+ actionmailer (5.2.4.4)
106
+ actionpack (= 5.2.4.4)
107
+ actionview (= 5.2.4.4)
108
+ activejob (= 5.2.4.4)
109
+ mail (~> 2.5, >= 2.5.4)
110
+ rails-dom-testing (~> 2.0)
111
+ actionpack (5.2.4.4)
112
+ actionview (= 5.2.4.4)
113
+ activesupport (= 5.2.4.4)
114
+ rack (~> 2.0, >= 2.0.8)
115
+ rack-test (>= 0.6.3)
116
+ rails-dom-testing (~> 2.0)
117
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
118
+ actionview (5.2.4.4)
119
+ activesupport (= 5.2.4.4)
120
+ builder (~> 3.1)
121
+ erubi (~> 1.4)
122
+ rails-dom-testing (~> 2.0)
123
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
124
+ activejob (5.2.4.4)
125
+ activesupport (= 5.2.4.4)
126
+ globalid (>= 0.3.6)
127
+ activemodel (5.2.4.4)
128
+ activesupport (= 5.2.4.4)
129
+ activerecord (5.2.4.4)
130
+ activemodel (= 5.2.4.4)
131
+ activesupport (= 5.2.4.4)
132
+ arel (>= 9.0)
133
+ activestorage (5.2.4.4)
134
+ actionpack (= 5.2.4.4)
135
+ activerecord (= 5.2.4.4)
136
+ marcel (~> 0.3.1)
137
+ activesupport (5.2.4.4)
138
+ concurrent-ruby (~> 1.0, >= 1.0.2)
139
+ i18n (>= 0.7, < 2)
140
+ minitest (~> 5.1)
141
+ tzinfo (~> 1.1)
142
+ addressable (2.7.0)
143
+ public_suffix (>= 2.0.2, < 5.0)
144
+ archive-zip (0.12.0)
145
+ io-like (~> 0.3.0)
146
+ arel (9.0.0)
147
+ bindex (0.8.1)
148
+ bootsnap (1.4.8)
149
+ msgpack (~> 1.0)
150
+ builder (3.2.4)
151
+ byebug (11.1.3)
152
+ capybara (3.33.0)
153
+ addressable
154
+ mini_mime (>= 0.1.3)
155
+ nokogiri (~> 1.8)
156
+ rack (>= 1.6.0)
157
+ rack-test (>= 0.6.3)
158
+ regexp_parser (~> 1.5)
159
+ xpath (~> 3.2)
160
+ childprocess (3.0.0)
161
+ chromedriver-helper (2.1.1)
162
+ archive-zip (~> 0.10)
163
+ nokogiri (~> 1.8)
164
+ coderay (1.1.3)
165
+ coffee-rails (4.2.2)
166
+ coffee-script (>= 2.2.0)
167
+ railties (>= 4.0.0)
168
+ coffee-script (2.4.1)
169
+ coffee-script-source
170
+ execjs
171
+ coffee-script-source (1.12.2)
172
+ concurrent-ruby (1.1.7)
173
+ crass (1.0.6)
174
+ erubi (1.9.0)
175
+ erubis (2.7.0)
176
+ execjs (2.7.0)
177
+ ffi (1.13.1)
178
+ globalid (0.4.2)
179
+ activesupport (>= 4.2.0)
180
+ haml (5.1.2)
181
+ temple (>= 0.8.0)
182
+ tilt
183
+ haml-rails (2.0.1)
184
+ actionpack (>= 5.1)
185
+ activesupport (>= 5.1)
186
+ haml (>= 4.0.6, < 6.0)
187
+ html2haml (>= 1.0.1)
188
+ railties (>= 5.1)
189
+ html2haml (2.2.0)
190
+ erubis (~> 2.7.0)
191
+ haml (>= 4.0, < 6)
192
+ nokogiri (>= 1.6.0)
193
+ ruby_parser (~> 3.5)
194
+ i18n (1.8.5)
195
+ concurrent-ruby (~> 1.0)
196
+ io-like (0.3.1)
197
+ jbuilder (2.10.1)
198
+ activesupport (>= 5.0.0)
199
+ kgio (2.11.3)
200
+ listen (3.1.5)
201
+ rb-fsevent (~> 0.9, >= 0.9.4)
202
+ rb-inotify (~> 0.9, >= 0.9.7)
203
+ ruby_dep (~> 1.2)
204
+ loofah (2.7.0)
205
+ crass (~> 1.0.2)
206
+ nokogiri (>= 1.5.9)
207
+ mail (2.7.1)
208
+ mini_mime (>= 0.1.1)
209
+ marcel (0.3.3)
210
+ mimemagic (~> 0.3.2)
211
+ method_source (1.0.0)
212
+ mimemagic (0.3.5)
213
+ mini_mime (1.0.2)
214
+ mini_portile2 (2.4.0)
215
+ minitest (5.14.2)
216
+ msgpack (1.3.3)
217
+ mysql2 (0.5.3)
218
+ nio4r (2.5.3)
219
+ nokogiri (1.10.10)
220
+ mini_portile2 (~> 2.4.0)
221
+ pry (0.13.1)
222
+ coderay (~> 1.1)
223
+ method_source (~> 1.0)
224
+ pry-rails (0.3.9)
225
+ pry (>= 0.10.4)
226
+ public_suffix (4.0.6)
227
+ puma (3.12.6)
228
+ rack (2.2.3)
229
+ rack-test (1.1.0)
230
+ rack (>= 1.0, < 3)
231
+ rails (5.2.4.4)
232
+ actioncable (= 5.2.4.4)
233
+ actionmailer (= 5.2.4.4)
234
+ actionpack (= 5.2.4.4)
235
+ actionview (= 5.2.4.4)
236
+ activejob (= 5.2.4.4)
237
+ activemodel (= 5.2.4.4)
238
+ activerecord (= 5.2.4.4)
239
+ activestorage (= 5.2.4.4)
240
+ activesupport (= 5.2.4.4)
241
+ bundler (>= 1.3.0)
242
+ railties (= 5.2.4.4)
243
+ sprockets-rails (>= 2.0.0)
244
+ rails-dom-testing (2.0.3)
245
+ activesupport (>= 4.2.0)
246
+ nokogiri (>= 1.6)
247
+ rails-html-sanitizer (1.3.0)
248
+ loofah (~> 2.3)
249
+ railties (5.2.4.4)
250
+ actionpack (= 5.2.4.4)
251
+ activesupport (= 5.2.4.4)
252
+ method_source
253
+ rake (>= 0.8.7)
254
+ thor (>= 0.19.0, < 2.0)
255
+ raindrops (0.19.1)
256
+ rake (13.0.1)
257
+ rb-fsevent (0.10.4)
258
+ rb-inotify (0.10.1)
259
+ ffi (~> 1.0)
260
+ regexp_parser (1.7.1)
261
+ ruby_dep (1.5.0)
262
+ ruby_parser (3.15.0)
263
+ sexp_processor (~> 4.9)
264
+ rubyzip (2.3.0)
265
+ sass (3.7.4)
266
+ sass-listen (~> 4.0.0)
267
+ sass-listen (4.0.0)
268
+ rb-fsevent (~> 0.9, >= 0.9.4)
269
+ rb-inotify (~> 0.9, >= 0.9.7)
270
+ sass-rails (5.1.0)
271
+ railties (>= 5.2.0)
272
+ sass (~> 3.1)
273
+ sprockets (>= 2.8, < 4.0)
274
+ sprockets-rails (>= 2.0, < 4.0)
275
+ tilt (>= 1.1, < 3)
276
+ selenium-webdriver (3.142.7)
277
+ childprocess (>= 0.5, < 4.0)
278
+ rubyzip (>= 1.2.2)
279
+ sexp_processor (4.15.1)
280
+ spring (2.1.1)
281
+ spring-watcher-listen (2.0.1)
282
+ listen (>= 2.7, < 4.0)
283
+ spring (>= 1.2, < 3.0)
284
+ sprockets (3.7.2)
285
+ concurrent-ruby (~> 1.0)
286
+ rack (> 1, < 3)
287
+ sprockets-rails (3.2.2)
288
+ actionpack (>= 4.0)
289
+ activesupport (>= 4.0)
290
+ sprockets (>= 3.0.0)
291
+ temple (0.8.2)
292
+ thor (1.0.1)
293
+ thread_safe (0.3.6)
294
+ tilt (2.0.10)
295
+ turbolinks (5.2.1)
296
+ turbolinks-source (~> 5.2)
297
+ turbolinks-source (5.2.0)
298
+ tzinfo (1.2.7)
299
+ thread_safe (~> 0.1)
300
+ uglifier (4.2.0)
301
+ execjs (>= 0.3.0, < 3)
302
+ unicorn (5.4.1)
303
+ kgio (~> 2.6)
304
+ raindrops (~> 0.7)
305
+ web-console (3.7.0)
306
+ actionview (>= 5.0)
307
+ activemodel (>= 5.0)
308
+ bindex (>= 0.4.0)
309
+ railties (>= 5.0)
310
+ websocket-driver (0.7.3)
311
+ websocket-extensions (>= 0.1.0)
312
+ websocket-extensions (0.1.5)
313
+ xpath (3.2.0)
314
+ nokogiri (~> 1.8)
315
+
316
+ PLATFORMS
317
+ ruby
318
+
319
+ DEPENDENCIES
320
+ bootsnap (>= 1.1.0)
321
+ byebug
322
+ capybara (>= 2.15)
323
+ chromedriver-helper
324
+ coffee-rails (~> 4.2)
325
+ haml-rails
326
+ jbuilder (~> 2.5)
327
+ listen (>= 3.0.5, < 3.2)
328
+ mysql2 (>= 0.4.4, < 0.6.0)
329
+ pry-rails
330
+ puma (~> 3.11)
331
+ rails (~> 5.2.2)
332
+ sass-rails (~> 5.0)
333
+ selenium-webdriver
334
+ spring
335
+ spring-watcher-listen (~> 2.0.0)
336
+ turbolinks (~> 5)
337
+ tzinfo-data
338
+ uglifier (>= 1.3.0)
339
+ unicorn (= 5.4.1)
340
+ web-console (>= 3.3.0)
341
+
342
+ RUBY VERSION
343
+ ruby 2.5.3p105
344
+
345
+ BUNDLED WITH
346
+ 2.1.4
347
+
348
+ ```

2

修正

2020/09/14 14:05

投稿

keisuke.F
keisuke.F

スコア19

title CHANGED
@@ -1,1 +1,1 @@
1
- 本番環境でbundle installができない
1
+ Your Ruby version is 2.5.3, but your Gemfile specified 2.5.1のエラー
body CHANGED
@@ -1,34 +1,90 @@
1
1
  お世話になっております。
2
2
  現在、開発中のアプリをデプロイする作業をしております。
3
3
 
4
- ターミナルの[ec2-user@ip-00000000 アプリ名にて、bundle installと入力すると、下記のエラーが出ます。
4
+ ターミナルの[ec2-user@ip-00000000 リポジトリbundle installと入力すると、下記のエラーが出ます。
5
5
  ```
6
6
  Your Ruby version is 2.5.3, but your Gemfile specified 2.5.1
7
7
  ```
8
- Rubyのバージョンを変えたので起こったエラーだと思いますが、調べ2.5.3になっていると思うのです
8
+ Rubyのバージョンを変えたので起こったエラーだと思いますが、て2.5.3に書き換えました
9
9
 
10
- gem environmentで確認しても、RUBY VERSION: 2.5.3の確認ができました。
11
- ローカルでも、全ての記述を2.5.3に変えリモートにプッシュしました。
12
10
 
11
+ しかし、同じエラーが続きます。
13
12
 
14
13
  何が原因なのでしょうか。
15
14
 
15
+
16
- ローカルで
16
+ gemfile
17
17
  ```
18
+ source 'https://rubygems.org'
19
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
20
+
21
+ ruby '2.5.3'
22
+
23
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
24
+ gem 'rails', '~> 5.2.2'
25
+ # Use mysql as the database for Active Record
26
+ gem 'mysql2', '>= 0.4.4', '< 0.6.0'
27
+ # Use Puma as the app server
28
+ gem 'puma', '~> 3.11'
29
+ # Use SCSS for stylesheets
30
+ gem 'sass-rails', '~> 5.0'
31
+ # Use Uglifier as compressor for JavaScript assets
32
+ gem 'uglifier', '>= 1.3.0'
33
+ # See https://github.com/rails/execjs#readme for more supported runtimes
34
+ # gem 'mini_racer', platforms: :ruby
35
+
36
+ # Use CoffeeScript for .coffee assets and views
37
+ gem 'coffee-rails', '~> 4.2'
38
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
39
+ gem 'turbolinks', '~> 5'
40
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
41
+ gem 'jbuilder', '~> 2.5'
42
+ # Use Redis adapter to run Action Cable in production
43
+ # gem 'redis', '~> 4.0'
44
+ # Use ActiveModel has_secure_password
45
+ # gem 'bcrypt', '~> 3.1.7'
46
+
47
+ # Use ActiveStorage variant
48
+ # gem 'mini_magick', '~> 4.8'
49
+
18
- docker-compose run web bundler -v
50
+ # Use Capistrano for deployment
51
+ # gem 'capistrano-rails', group: :development
52
+
53
+ # Reduces boot times through caching; required in config/boot.rb
54
+ gem 'bootsnap', '>= 1.1.0', require: false
55
+ gem 'haml-rails'
56
+ gem 'pry-rails'
57
+
58
+
59
+ group :development, :test do
60
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
61
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
62
+ end
63
+
64
+ group :development do
65
+ # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
66
+ gem 'web-console', '>= 3.3.0'
67
+ gem 'listen', '>= 3.0.5', '< 3.2'
68
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
69
+ gem 'spring'
70
+ gem 'spring-watcher-listen', '~> 2.0.0'
71
+ end
72
+
73
+ group :test do
74
+ # Adds support for Capybara system testing and selenium driver
75
+ gem 'capybara', '>= 2.15'
76
+ gem 'selenium-webdriver'
77
+ # Easy installation and use of chromedriver to run system tests with Chrome
78
+ gem 'chromedriver-helper'
79
+ end
80
+
81
+ group :production do
82
+ gem 'unicorn', '5.4.1'
83
+ end
84
+
85
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
86
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
87
+
19
88
  ```
20
- を打つと、
21
- ```
22
- Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"bundler\": executable file not found in $PATH": unknown
23
- ```
24
- と出ます。
25
- ```
26
- docker-compose run webを打たずに、bundler -v
27
- ```
28
- とだけ打つと
29
- ```
30
- The `bundler' command exists in these Ruby versions:
31
- 2.5.1
32
- ```
33
89
 
34
-  と出ます。
90
+ よろしくお願い致します。

1

修正

2020/09/14 11:26

投稿

keisuke.F
keisuke.F

スコア19

title CHANGED
File without changes
body CHANGED
@@ -11,4 +11,24 @@
11
11
  ローカルでも、全ての記述を2.5.3に変えリモートにプッシュしました。
12
12
 
13
13
 
14
- 何が原因なのでしょうか。
14
+ 何が原因なのでしょうか。
15
+
16
+ ローカルで
17
+ ```
18
+ docker-compose run web bundler -v
19
+ ```
20
+ を打つと、
21
+ ```
22
+ Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"bundler\": executable file not found in $PATH": unknown
23
+ ```
24
+ と出ます。
25
+ ```
26
+ docker-compose run webを打たずに、bundler -v
27
+ ```
28
+ とだけ打つと
29
+ ```
30
+ The `bundler' command exists in these Ruby versions:
31
+ 2.5.1
32
+ ```
33
+
34
+  と出ます。