In this short tutorial of mine, I am going to write down the steps of how you can install mysql2 gem with Ruby2.0 on Windows machine.
Installing Mysql gem is always a big time pain for most of the developers who are working on Windows machine. But thanks to active folks over the internet for their comments, posts.
1. Ruby 2.0.0 pre-installed.
2. DevKit installed
3. gem install rails – command should install all the gems. Return should be success.
Steps to install mysql gem:
1. Go to: http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip/from/pick, download will start automatically (don’t think at this moment that you’ve a 32 bit or 64 bit operating system.
2. Extract the folder to some place (in my case I am extracting it to C:\mysql-connector-c-noinstall-6.0.2
3. Run this command:
4. Output will return in below manner:
5. If you see this message, create a new Rails4 application, open your Gemfile and use:
gem 'mysql2', '0.3.13'
and run bundle install. Once bundle install runs successfully. You should try:
rake db:create and
to ensure that gem is installed correctly.
Hope this will help someone!
Happy Coding!! 🙂