升級ror版本

來源:互聯網
上載者:User

升級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/

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.