升级rails版本和Gem版本时,先
gem update rails
gem update
然后它会出现mysql的驱动错误的提示如下:
问题: The bundled mysql.rb driver has been removed from Rails 2.2. Please
install the mysql gem and try again: gem install mysql.C:/ruby/lib/
ruby/gems/1.8/gems/mysql-2.7.3-x86-mswin32/ext/mysql.so
答案:
我在电脑上解决成功的方法:gem install mysql 然后直接copy instantrails中的/mysql/bin/libmysql.dll,放进"/ruby/bin"
********
感觉这是windows下mysql gem的问题
如果libmysql.dll的版本不对的话(或者mysql安装目录有空格?)
就会出这个错
我的是windows vista, mysql 5.1.30,直接copy mysql/bin/libmysql.dll到ruby/bin不管用,找下面的办法,从instantrails那里找个libmysql.dll放到ruby/bin里面管用了
搜来一个管用的办法:http://www.ruby-forum.com/topic/172179
If you are having problems with MySQL, getting errors like: The
bundled mysql.rb driver has been removed from Rails 2.2. Please
install the mysql gem and try again: gem install mysql.C:/ruby/lib/
ruby/gems/1.8/gems/mysql-2.7.3-x86-mswin32/ext/mysql.so
Here is the solution: 1) First, gem install mysql. If this doesn't
help continue 2) Copy libmysql.dll from InstantRails (see below) to
your mysql directory (C:/mysql/bin/). Restart your computer and it
should be working.
InstantRails libmysql.dll:
http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/
升级ror版本
最新推荐文章于 2022-02-16 12:05:12 发布