首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

ubuntu12.04上 rails 安装mysql

2013-03-12 
ubuntu12.04下rails 安装mysql1.安装mysqlsudo apt-get install mysql-server2.如果此时马上bundle,可能会

ubuntu12.04下 rails 安装mysql
1.安装mysql
sudo apt-get install mysql-server

2.如果此时马上bundle,可能会报如下错误:
ERROR: Failed to build gem native extension
。。。
。。。。
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details
或者
An error occurred while installing mysql2 (0.3.11), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling.

总之,错误连连
3.解决方法:安装2个lib
sudo apt-get install libmysql-ruby libmysqlclient-dev

4.bundle, 成功! 楼主笑了!
游客,你笑了么~

热点排行