windows安装rails3.1.1 ruby1.9.2 mysql5.5.8
windows下使用RailsInstaller整合开发环境包,原装rails版本为3.1.1,ruby版本为1.9.2,mysql2适配器的版本为mysql2-0.3.11,mysql适配器版本需与rails版本相对应,可以通过以下命令进行mysql适配器的安装
gem install mysql2 -v 0.3.11 --platform x86-mingw3
rails new myapp -d=mysql
`require': Incorrect MySQL client library version! This gem was compiled for 6.0.0 but the client library is 5.0.27.
rake db:create创建数据库,当然需要在database.yml
development: adapter: mysql2 encoding: utf8 reconnect: false database: depots_development pool: 5 username: root password: password host: localhost
#encoding: utf-8即可。经过本人测试,通过以上操作,rails在windows下环境算是搭建好了。