The rails tutorial also entered the second week and I wanted to use mysql for the future instead of sqlite.
rails new application name --database = mysql
It is said that mysql can be used by using the above, but an error occurs. You will be asked to do the following, so follow it as is. gem install mysql2 -v '0.5.3' --source 'https://rubygems.org/' I'm told there is an error in mysql when using rails s. I get the same error when I bundle install.
From the conclusion, it was solved by executing the following commands in order. sudo apt-get install libmariadb-dev sudo apt-get install libmysqlclient-dev sudo yum install mysql-devel' gem install mysql2 -v '0.5.3' --source 'https://rubygems.org/'
In order to install a new package, it seems that it is necessary to install the original "-dev" somehow dev in advance. It seems that an error occurred because there was no data to be the source of this gem install.