I downloaded and installed ruby from this https://rubyinstaller.org/downloads/ -> Ruby Devkit 2.7.3-1 (x64) and follow the installation steps. but I got a error when I tried to install mysql2 for rails using
gem install mysql2
ruby version is 2.7.3p183
rails version is 6.1.3.2
gem version is 3.1.6
ERROR: Error installing mysql2: The last version of mysql2 (>= 0) to support your Ruby & RubyGems was 0.5.3. Try installing it with
gem install mysql2 -v 0.5.3
mysql2 requires Ruby version >= 2.2, < 2.7.dev. The current ruby version is 2.7.3.183.
I tried gem install mysql2 -v 0.5.3 but got same error.
I installed mysql before running this command, and I also have mysql on XAMPP. I installed MYSQL using mysql-installer-web-community-8.0.25.0
CodePudding user response:
I'd move to linux ubuntu or Mac for dev you'll get a lot more support and workarounds if needed. For ruby support on windows is non-existent. Not all gems work.
CodePudding user response:
I uninstalled my current ruby and reinstalled with rubyinstaller-devkit-2.6.7-1-x64.exe and it works.