質問編集履歴
4
エラー
test
CHANGED
File without changes
|
test
CHANGED
@@ -260,6 +260,16 @@
|
|
260
260
|
|
261
261
|
### 発生している問題・エラーメッセージ
|
262
262
|
|
263
|
+
>rails db:create
|
264
|
+
|
265
|
+
...
|
266
|
+
|
267
|
+
rails aborted!
|
268
|
+
|
269
|
+
LoadError: cannot load such file -- mysql2/2.6/mysql2
|
270
|
+
|
271
|
+
...
|
272
|
+
|
263
273
|
|
264
274
|
|
265
275
|
```
|
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,6 +18,246 @@
|
|
18
18
|
|
19
19
|
|
20
20
|
|
21
|
+
|
22
|
+
|
23
|
+
database.yml
|
24
|
+
|
25
|
+
```
|
26
|
+
|
27
|
+
# MySQL. Versions 5.1.10 and up are supported.
|
28
|
+
|
29
|
+
#
|
30
|
+
|
31
|
+
# Install the MySQL driver
|
32
|
+
|
33
|
+
# gem install mysql2
|
34
|
+
|
35
|
+
#
|
36
|
+
|
37
|
+
# Ensure the MySQL gem is defined in your Gemfile
|
38
|
+
|
39
|
+
# gem 'mysql2'
|
40
|
+
|
41
|
+
#
|
42
|
+
|
43
|
+
# And be sure to use new-style password hashing:
|
44
|
+
|
45
|
+
# https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
|
46
|
+
|
47
|
+
#
|
48
|
+
|
49
|
+
default: &default
|
50
|
+
|
51
|
+
adapter: mysql2
|
52
|
+
|
53
|
+
encoding: utf8
|
54
|
+
|
55
|
+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
56
|
+
|
57
|
+
username: root
|
58
|
+
|
59
|
+
password:
|
60
|
+
|
61
|
+
host: localhost
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
development:
|
66
|
+
|
67
|
+
<<: *default
|
68
|
+
|
69
|
+
database: gathernet_development
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
# Warning: The database defined as "test" will be erased and
|
74
|
+
|
75
|
+
# re-generated from your development database when you run "rake".
|
76
|
+
|
77
|
+
# Do not set this db to the same as development or production.
|
78
|
+
|
79
|
+
test:
|
80
|
+
|
81
|
+
<<: *default
|
82
|
+
|
83
|
+
database: gathernet_test
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
# As with config/secrets.yml, you never want to store sensitive information,
|
88
|
+
|
89
|
+
# like your database password, in your source code. If your source code is
|
90
|
+
|
91
|
+
# ever seen by anyone, they now have access to your database.
|
92
|
+
|
93
|
+
#
|
94
|
+
|
95
|
+
# Instead, provide the password as a unix environment variable when you boot
|
96
|
+
|
97
|
+
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
|
98
|
+
|
99
|
+
# for a full rundown on how to provide these environment variables in a
|
100
|
+
|
101
|
+
# production deployment.
|
102
|
+
|
103
|
+
#
|
104
|
+
|
105
|
+
# On Heroku and other platform providers, you may have a full connection URL
|
106
|
+
|
107
|
+
# available as an environment variable. For example:
|
108
|
+
|
109
|
+
#
|
110
|
+
|
111
|
+
# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase"
|
112
|
+
|
113
|
+
#
|
114
|
+
|
115
|
+
# You can use this database configuration with:
|
116
|
+
|
117
|
+
#
|
118
|
+
|
119
|
+
# production:
|
120
|
+
|
121
|
+
# url: <%= ENV['DATABASE_URL'] %>
|
122
|
+
|
123
|
+
#
|
124
|
+
|
125
|
+
production:
|
126
|
+
|
127
|
+
<<: *default
|
128
|
+
|
129
|
+
database: gathernet_production
|
130
|
+
|
131
|
+
username: gathernet
|
132
|
+
|
133
|
+
password: <%= ENV['GATHERNET_DATABASE_PASSWORD'] %>
|
134
|
+
|
135
|
+
```
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
Gemfile
|
140
|
+
|
141
|
+
```
|
142
|
+
|
143
|
+
source 'https://rubygems.org'
|
144
|
+
|
145
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
ruby '2.6.1'
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
154
|
+
|
155
|
+
gem 'rails', '~> 5.2.3'
|
156
|
+
|
157
|
+
# Use mysql as the database for Active Record
|
158
|
+
|
159
|
+
gem 'mysql2', '>= 0.4.4', '< 0.6.0'
|
160
|
+
|
161
|
+
# Use Puma as the app server
|
162
|
+
|
163
|
+
gem 'puma', '~> 3.11'
|
164
|
+
|
165
|
+
# Use SCSS for stylesheets
|
166
|
+
|
167
|
+
gem 'sass-rails', '~> 5.0'
|
168
|
+
|
169
|
+
# Use Uglifier as compressor for JavaScript assets
|
170
|
+
|
171
|
+
gem 'uglifier', '>= 1.3.0'
|
172
|
+
|
173
|
+
# See https://github.com/rails/execjs#readme for more supported runtimes
|
174
|
+
|
175
|
+
gem 'duktape'
|
176
|
+
|
177
|
+
# Use CoffeeScript for .coffee assets and views
|
178
|
+
|
179
|
+
gem 'coffee-rails', '~> 4.2'
|
180
|
+
|
181
|
+
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
182
|
+
|
183
|
+
gem 'turbolinks', '~> 5'
|
184
|
+
|
185
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
186
|
+
|
187
|
+
gem 'jbuilder', '~> 2.5'
|
188
|
+
|
189
|
+
# Use Redis adapter to run Action Cable in production
|
190
|
+
|
191
|
+
# gem 'redis', '~> 4.0'
|
192
|
+
|
193
|
+
# Use ActiveModel has_secure_password
|
194
|
+
|
195
|
+
# gem 'bcrypt', '~> 3.1.7'
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
# Use ActiveStorage variant
|
200
|
+
|
201
|
+
# gem 'mini_magick', '~> 4.8'
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
# Use Capistrano for deployment
|
206
|
+
|
207
|
+
# gem 'capistrano-rails', group: :development
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
# Reduces boot times through caching; required in config/boot.rb
|
212
|
+
|
213
|
+
gem 'bootsnap', '>= 1.1.0', require: false
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
group :development, :test do
|
218
|
+
|
219
|
+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
220
|
+
|
221
|
+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
|
222
|
+
|
223
|
+
end
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
group :development do
|
228
|
+
|
229
|
+
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
|
230
|
+
|
231
|
+
gem 'web-console', '>= 3.3.0'
|
232
|
+
|
233
|
+
end
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
group :test do
|
238
|
+
|
239
|
+
# Adds support for Capybara system testing and selenium driver
|
240
|
+
|
241
|
+
gem 'capybara', '>= 2.15'
|
242
|
+
|
243
|
+
gem 'selenium-webdriver'
|
244
|
+
|
245
|
+
# Easy installation and use of chromedriver to run system tests with Chrome
|
246
|
+
|
247
|
+
gem 'chromedriver-helper'
|
248
|
+
|
249
|
+
end
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
254
|
+
|
255
|
+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
256
|
+
|
257
|
+
```
|
258
|
+
|
259
|
+
|
260
|
+
|
21
261
|
### 発生している問題・エラーメッセージ
|
22
262
|
|
23
263
|
|
@@ -72,6 +312,50 @@
|
|
72
312
|
|
73
313
|
|
74
314
|
|
315
|
+
```
|
316
|
+
|
317
|
+
C:\Users\syuwa\rails\gathernet>gem uninstall mysql2
|
318
|
+
|
319
|
+
Successfully uninstalled mysql2-0.4.10-x64-mingw32
|
320
|
+
|
321
|
+
Successfully uninstalled mysql2-0.5.2
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
C:\Users\syuwa\rails\gathernet>gem install mysql2 --platform=ruby
|
326
|
+
|
327
|
+
Fetching mysql2-0.5.2.gem
|
328
|
+
|
329
|
+
Temporarily enhancing PATH for MSYS/MINGW...
|
330
|
+
|
331
|
+
Installing required msys2 packages: mingw-w64-x86_64-libmariadbclient
|
332
|
+
|
333
|
+
警告: mingw-w64-x86_64-libmariadbclient-2.3.5-2 は最新です -- スキップ
|
334
|
+
|
335
|
+
Building native extensions. This could take a while...
|
336
|
+
|
337
|
+
Successfully installed mysql2-0.5.2
|
338
|
+
|
339
|
+
Parsing documentation for mysql2-0.5.2
|
340
|
+
|
341
|
+
Installing ri documentation for mysql2-0.5.2
|
342
|
+
|
343
|
+
Done installing documentation for mysql2 after 2 seconds
|
344
|
+
|
345
|
+
1 gem installed
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
C:\Users\syuwa\rails\gathernet>rails db:create
|
350
|
+
|
351
|
+
Could not find mysql2-0.4.10-x64-mingw32 in any of the sources
|
352
|
+
|
353
|
+
Run `bundle install` to install missing gems.
|
354
|
+
|
355
|
+
```
|
356
|
+
|
357
|
+
|
358
|
+
|
75
359
|
ローカル開発環境の構築に丸2日くらいかかっているのですが、中々できないのでどなたか助けて頂けると非常に嬉しいです。
|
76
360
|
|
77
361
|
|
2
試したこと
test
CHANGED
File without changes
|
test
CHANGED
@@ -72,7 +72,7 @@
|
|
72
72
|
|
73
73
|
|
74
74
|
|
75
|
-
ローカル開発環境の構築に丸2日
|
75
|
+
ローカル開発環境の構築に丸2日くらいかかっているのですが、中々できないのでどなたか助けて頂けると非常に嬉しいです。
|
76
76
|
|
77
77
|
|
78
78
|
|
1
タグの追加
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|