As you all know, MySQL is a database, mysql2 is a ** Rails-specific gem **, and I interpret it as a bridge that connects the database and Rails.
$ bundle install --path vendor/bundle An error occurred while installing mysql2 (0.5.3), and Bundler cannot continue. Make sure that `gem install mysql2 -v '0.5.3' --source 'https://rubygems.org/'` succeeds before bundling. $ gem install mysql2 -v '0.5.3' ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
And even if you do bundle install, you have become an infinite loop resident, saying, "Oh, don't get close to me !!"
I was also a resident there, but don't worry, you can escape lol
** In conclusion, it's okay if you never installed mysql2. ** **
Here, the familiar Gemfile and Gemfile.lock come out.
Gemfile is a "** to buy list " when you go to buy game software. Gemfile.lock is a " receipt **".
When doing bundle install, I look at the software on this shopping list and install the gem. The cause of the error now is the state of "** Are you going to buy the game software on the receipt again? **".
Unless you are playing game software, watching it, or saving it, lol That's it.
So, let's assume that we have never bought it and buy the new series version again. It is a story. However, there are two things to do.
$ gem uninstall mysql2
Removed the one named mysql2
And let's buy it again!
$ bundle install --path vendor/bundle