您的位置:首页 > 大数据 > 人工智能

windows下进行rails安装

2014-05-12 23:20 169 查看
主要是参考:http://www.admin10000.com/Document/140.html

x:/>rails new work --database mysql

错误信息如下:

extconf failed, exit code 1

Gem files will remain installed in D:/BillFiles/rails_dev/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.15 for inspection.

Results logged to D:/BillFiles/rails_dev/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/mysql2-0.3.15/gem_make.out

An error occurred while installing mysql2 (0.3.15), and Bundler cannot continue.

Make sure that `gem install mysql2 -v '0.3.15'` succeeds before bundling.

找遍google,都是ubuntu的命令行,主要是更新libmysqlclient-dev。

参考:http://stackoverflow.com/questions/3608287/error-installing-mysql2-failed-to-build-gem-native-extension

x:/>gem install mysql2 -- '--with-mysql-lib="C:\Program Files\MySQL\MySQL Server 5.6\lib" --with-mysql-include="C:\Program Files\MySQL\MySQL Server 5.6\include"'

将C:\Program Files\MySQL\MySQL Server 5.6\lib\libmysql.dll复制到ruby/bin目录下。

执行:x:/>rails new work --database mysql

成功!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: