1 Replies - 6386 Views - Last Post: 17 December 2008 - 08:17 PM Rate Topic: -----

#1 killnine  Icon User is offline

  • D.I.C Head

Reputation: 19
  • View blog
  • Posts: 161
  • Joined: 12-February 07

RoR: SQL gem doesn't work

Posted 17 December 2008 - 05:13 PM

So I am using RadRails (radrails.org) as an IDE to learn Ruby (on Rails).

Unfortunately, even the tutorials I am using fail to work successfully (http://www.aptana.com/docs/index.php/Get_Rolling_with_Ruby_on_Rails_in_RadRails%2C_Part_1). All I am trying to do is get the changes to migrate to my database but every time I try to, I get the following error:

Quote

>rake db:migrate
(in C:/Users/xxx/yyy/Aptana Studio/Shovell)
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
rake aborted!
126: The specified module could not be found. - C:/Ruby/lib/ruby/gems/1.8/gems/mysql-2.7.3-x86-mswin32/ext/mysql.so

(See full trace by running task with --trace)



I have tried installing mysql again with "gem install mysql", but it doesnt seem to change anything.

I even tried removing the mysql.so file as suggested here: http://www.nabble.co...td16529310.html.


I am stuck, and REALLY need this sort of functionality (mySQL). Any thoughts or suggestions?

Is This A Good Question/Topic? 1

#50 killnine  Icon User is offline

  • D.I.C Head

Reputation: 19
  • View blog
  • Posts: 161
  • Joined: 12-February 07

Re: RoR: SQL gem doesn't work

Posted 17 December 2008 - 08:17 PM

Wow, after hours and hours of searching, I found a solution at this location: http://forums.aptana...opic.php?t=7563.

To save you a trip, I have pasted the user's solution:

Quote

If at any point when you've upgraded to Rails 2.2. you get the following error on Windows:

"!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql."

the problem is because MySQL 5.1 client library doesn't play well with Rails - the solution is simple however:

- download older MySQL client library, for example one from InstantRails: http://instantrails....in/libmySQL.dll

- copy the downloaded file to C:\Ruby\bin (or wherever you installed Ruby)

- restart MySQL server

That's it! Just thought I'd share this with others, lost me an hour of researching.

Good luck!

Was This Post Helpful? 1

Page 1 of 1