I did the following to install Ruby on Rails on Windows XP:
- Installed rubyinstaller-1.9.2-p0.exe
- gem install rails
- gem install mysql2
- cd my_dir
- rails new my_app -d mysql
The created config/database.yml contains the following MySQL configuration:
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: first_development
pool: 5
username: root
password:
host: localhost
However, when I run rails server from my_dir I got the following error:
D:/Programs/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2
/mysql2.rb:2:in `require': 126: The specified module could not be found. - D:/
Programs/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/1.
9/mysql2.so (LoadError)
...
along with the following pop-up message:
The application has failed to start because LIBMYSQL.dll was not found. Re-installing the application may fix this problem.
The problem, I guess, is the installation of MySQL.
I have WAMP installed, and I would like to use its MySQL installation.
I searched for libmysql.dll and indeed found it in: my_path_to_wamp\bin\mysql\mysql5.1.36\bin\libmysql.dll
The question is how would I tell Rails to take this installation of MySQL ?