回答編集履歴

1

追記

2021/03/14 07:20

投稿

technocore
technocore

スコア7247

test CHANGED
@@ -9,3 +9,31 @@
9
9
  Successfully installed mysql2-0.5.3
10
10
 
11
11
  1 gem installed
12
+
13
+
14
+
15
+
16
+
17
+ <追記>
18
+
19
+ ちなみにrails newの時にmysqlを指定すれば、bundlerが勝手にmysql2をインストールしてくれます。
20
+
21
+
22
+
23
+ 1 source 'https://rubygems.org'
24
+
25
+ 2 git_source(:github) { |repo| "https://github.com/#{repo}.git" }
26
+
27
+ 3
28
+
29
+ 4 ruby '3.0.0'
30
+
31
+ 5
32
+
33
+ 6 # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
34
+
35
+ 7 gem 'rails', '~> 6.1.3'
36
+
37
+ 8 # Use mysql as the database for Active Record
38
+
39
+ 9 gem 'mysql2', '~> 0.5'