School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,109 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,026 people online right now. Registration is fast and FREE... Join Now!




RoR: SQL gem doesn't work

 

RoR: SQL gem doesn't work

killnine

17 Dec, 2008 - 04:13 PM
Post #1

D.I.C Head
**

Joined: 12 Feb, 2007
Posts: 159



Thanked: 16 times
My Contributions
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.com/Problem-installing-m...td16529310.html.


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

User is offlineProfile CardPM
+Quote Post


killnine

RE: RoR: SQL Gem Doesn't Work

17 Dec, 2008 - 07:17 PM
Post #2

D.I.C Head
**

Joined: 12 Feb, 2007
Posts: 159



Thanked: 16 times
My Contributions
Wow, after hours and hours of searching, I found a solution at this location: http://forums.aptana.com/viewtopic.php?t=7563.

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

QUOTE("Protech_v2")

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.rubyforge.org/svn/trun...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!

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 12:47PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month