Ruby 1.9.2p290 + rails2.3.4 + mysql5.5.15 database inaccessible

Source: Internet
Author: User

My environment is Ruby 1.9.2p290 + rails2.3.4 + mysql5.5.15. When I run "DB: migrate", the error message is as follows:
!!! The bundled mysql. RB driver has been removed from rails 2.2. Please install the MySQL gem and try again: Gem install MySQL.
Rake aborted!
Rubygem version error: MySQL (2.7.3 not> = 0)
(See full trace by running task with -- Trace)
What is the cause? Follow the prompts to run "Gem install MySQL" and prompt "error: cocould not find a valid gem 'mysql' (> = 0) in any repository"

 

Solution:

1. Download and install ruby-mysql at http://www.tmtm.org/en/ruby/mysql/

Install
 
# Ruby./install. Rb (Today I verified it again. The first step is for the solution under Linux, which cannot be executed. Otherwise, problems will occur when connecting to the database, and the database installation will followHttp://www.cnblogs.com/huzhiwei/archive/2012/02/22/2363721.html)
2. Go to http://rubyforge.iasi.roedu.net/gems/download mysql-2.7.3-mswin32.gem

Gem install mysql-2.8.1-x86-mswin32.gem


3. Copy libmysql. dll under the bin directory of MySQL to the bin directory of Ruby. (This does not seem necessary. For details, refer to idea)
 
 
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.