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

回答編集履歴

1

追記

2021/03/14 07:20

投稿

technocore
technocore

スコア7398

answer CHANGED
@@ -3,4 +3,18 @@
3
3
  Fetching mysql2-0.5.3.gem
4
4
  Building native extensions. This could take a while...
5
5
  Successfully installed mysql2-0.5.3
6
- 1 gem installed
6
+ 1 gem installed
7
+
8
+
9
+ <追記>
10
+ ちなみにrails newの時にmysqlを指定すれば、bundlerが勝手にmysql2をインストールしてくれます。
11
+
12
+ 1 source 'https://rubygems.org'
13
+ 2 git_source(:github) { |repo| "https://github.com/#{repo}.git" }
14
+ 3
15
+ 4 ruby '3.0.0'
16
+ 5
17
+ 6 # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
18
+ 7 gem 'rails', '~> 6.1.3'
19
+ 8 # Use mysql as the database for Active Record
20
+ 9 gem 'mysql2', '~> 0.5'