Install MySQL driver in rails in Windows

Source: Internet
Author: User
1. Install Ruby
I will not talk nonsense about this. The installation is very simple and there are a lot of online materials.
After installation, add D: Ruby \ bin to the environment variable path (depending on your installation path)
After the installation is complete, enter ruby-V in the command line. The version number is displayed, indicating that the installation is successful. My version number is 1.8.6.

2. Install rails
I suggest you go to the official website to download the rails-2.3.2.gem and then enter the gem install rails-2.3.2.gem in the command line, wait and OK. The supervisor cannot be installed, so it is depressing. Later, I used thunder. It's okay if you don't care that much. You can just install it)

3. MySQL database driver Configuration
A. The first step is to install mysql. I will not talk about it much, so it is safe.
B. Find ibmysql. dll in the bin directory of the MySQL installation directory and copy the file to the bin directory of the Ruby installation directory.
C. and then to fuse (like the previous problem, you have to use thunder to get down to the correct format), this is the MySQL driver, from the command line to enter the directory of the file, run the gem install mysql-2.7.3-mswin32.gem, do not make it a success. The following error may occur:
Successfully installed mysql-2.7.3-x86-mswin32
1 gem installed
Installing Ri documentation for mysql-2.7.3-x86-mswin32...
Installing rdoc documentation for mysql-2.7.3-x86-mswin32...
Error: while generating documentation for mysql-2.7.3-x86-mswin32
... Message: unhandled Special: TYPE = 17, text = "<! -- $ ID: readme.html, V 1.20 2006-12-2
0 05:31:52 Tommy exp $ -->"
... Rdoc ARGs: -- op D:/Ruby/lib/Ruby/gems/1.8/doc/mysql-2.7.3-x86-mswin32/rdoc -- exclude ext -- m
Ain readme -- Quiet ext readme docs/readme.html -- title mysql-2.7.3-x86-mswin32 documentation
(Continuing with the rest of the installation)
This is because you didn't press rdoc
Http://rubyforge.org/frs? Group_id = 627 go to the next rdoc-2.4.3.gem, then run the gem install rdoc-2.4.3.gem, after the installation is successful, go back and re-run the gem install mysql-2.7.3.gem.
So far, you can start learning well.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.