Rails Lynda.com RoR 3 视频教程 $ rails s 的问题

durden · April 28, 2012 · Last by durden replied at April 28, 2012 · 2724 hits

我安装好了 rails 3.0.1(教程中用的是 3.0.0)和 mysql

按照教程中的指引通过$ rails new simple_cms -d mysql 新建了项目 进入项目目录后$ rails s 却无法启动服务器,被提示缺少 mysql2 的 gem,但是视频中讲师没有出现这个问题呢?他直接就成功启动了服务器,难道是 rails 版本不同的原因?

不好意思,是自己看漏了一个视频...

我 cd ~回到根目录下面$ sudo gem install mysql2 但是被提示 Error installing mysql2 Error: failed to build gem native extension ... extconf.rb failed could not create Makefile due to some reason ... Gem file will remain install in /usr/.../gems/1.9.1/gems/mysql2-0.3.11 for inspection

google 了下,sudo apt-get install libmysqlclient-dev 用这条命令解决问题了 :D

You need to Sign in before reply, if you don't have an account, please Sign up first.