# Ruby mysql error

**URL:** <https://www.ruby-forum.com/t/ruby-mysql-error/157129>\
**Category:** Ruby\
**Created:** [January 7, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/ruby-mysql-error/157129 "2009-01-07T17:15:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![maged](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/51bf81/32.png) [@maged](https://www.ruby-forum.com/u/maged)\
**Post date:** [January 7, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/ruby-mysql-error/157129/1 "2009-01-07T17:15:00Z")

</div>

Hi All, I’m trying to run mysql DB with ROR app. I’m using Netbeans 6.5  
and whenever I run the server and it tried to hit the DB, I get the  
error:

* * *

C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active\_record/connection\_adapters/abstract\_adapter.rb:38:  
[BUG] Segmentation fault

ruby 1.8.6 (2007-09-24) [i386-mswin32]

This application has requested the Runtime to terminate it in an unusual  
way.  
Please contact the application’s support team for more information.

* * *

Any thoughts

Thanks in advance

Maged

---

<div class="post-metadata">

**Author:** ![maged](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/51bf81/32.png) [@maged](https://www.ruby-forum.com/u/maged)\
**Post date:** [January 8, 2009, 7:35am UTC](https://www.ruby-forum.com/t/ruby-mysql-error/157129/2 "2009-01-08T07:35:12Z")

</div>

Maged M. wrote:

> Hi All, I’m trying to run mysql DB with ROR app. I’m using Netbeans 6.5  
> and whenever I run the server and it tried to hit the DB, I get the  
> error:
> 
> * * *
> 
> C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active\_record/connection\_adapters/abstract\_adapter.rb:38:  
> [BUG] Segmentation fault
> 
> ruby 1.8.6 (2007-09-24) [i386-mswin32]

You could try installing other versions of ruby:  
one click installer  
mingw [1]

with mingw it comes with gdb so you could post a more thorough backtrace  
which would probably also be useful.  
Try upgrading your gem too.  
That type of thing.

[1]

> **[Still playing with Ruby on Windows | AkitaOnRails.com](https://www.akitaonrails.com/2008/7/26/still-playing-with-ruby-on-windows)**
>
> Leitores brasileiros: cliquem aqui
> A week ago I’ve tested the newest One-Click Ruby Installer build and found a few minor glitches. Since then I’ve...

can install some mingw gems via:  
gem list --remote --source [http://gems.rubyinstaller.org](http://gems.rubyinstaller.org)

---

<div class="post-metadata">

**Author:** ![maged](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/51bf81/32.png) [@maged](https://www.ruby-forum.com/u/maged)\
**Post date:** [January 25, 2009, 8:55am UTC](https://www.ruby-forum.com/t/ruby-mysql-error/157129/3 "2009-01-25T08:55:52Z")

</div>

On Jan 7, 11:14 am, Maged M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## This application has requested the Runtime to terminate it in an unusual
> 
> Posted viahttp://www.ruby-forum.com/.

ok, i had this problem and solved it.  
the problem is that starting from rails 2.2, mysql support is not  
included by default  
(sqlite3 is the new default) and you have to install it as a gem  
so i assume you did “gem install mysql” or something similar.  
now the problem is that this gem does not seem to work with newer  
versions of mysql  
(at least for now).

specifically, in my case, i use windows for development.  
one of my machines had mysql community version mysql-5.0.67-win32 and  
everything seemed fine.  
on a newer machine i had mysql-5.1.30-win32 and it gave me this  
segmentation fault!  
simply rolling back to version 5.0.67 fixed this problem.

hope that helps.  
-prash.

---

<div class="post-metadata">

**Author:** ![maged](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/51bf81/32.png) [@maged](https://www.ruby-forum.com/u/maged)\
**Post date:** [February 12, 2009, 9:09am UTC](https://www.ruby-forum.com/t/ruby-mysql-error/157129/4 "2009-02-12T09:09:52Z")

</div>

=\> Booting WEBrick…  
=\> Rails 2.2.2 application started on [http://0.0.0.0:3000](http://0.0.0.0:3000)  
=\> Ctrl-C to shutdown server; call with --help for options  
[2009-02-12 00:02:32] INFO WEBrick 1.3.1  
[2009-02-12 00:02:32] INFO ruby 1.8.7 (2008-05-31) [i386-mswin32]  
[2009-02-12 00:02:32] INFO WEBrick::HTTPServer#start: pid=4544  
port=3000  
127.0.0.1 - - [12/Feb/2009:00:03:34 Pacific Standard Time] “GET  
/category  
HTTP/1.1” 404 618

- → /category  
127.0.0.1 - - [12/Feb/2009:00:03:36 Pacific Standard Time] “GET  
/favicon.ico  
HTTP/1.1” 200 0
- → /favicon.ico  
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active\_record/connection\_adapters/mysql\_adapter.rb:196:  
[BUG] Segmentation fault  
ruby 1.8.7 (2008-05-31 patchlevel 0) [i386-mswin32]

This application has requested the Runtime to terminate it in an unusual  
way.  
Please contact the application’s support team for more information.

I’m getting this as well… how do I fix?

* * *

From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Friday, January 30, 2009 2:37 PM  
Newsgroups: comp.lang.ruby  
To: “ruby-talk ML” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: ruby mysql error

---

<div class="post-metadata">

**Author:** ![maged](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/51bf81/32.png) [@maged](https://www.ruby-forum.com/u/maged)\
**Post date:** [February 14, 2009, 7:56am UTC](https://www.ruby-forum.com/t/ruby-mysql-error/157129/5 "2009-02-14T07:56:38Z")

</div>

> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active\_record/connection\_adapters/mysql\_adapter.rb:196:  
> [BUG] Segmentation fault  
> ruby 1.8.7 (2008-05-31 patchlevel 0) [i386-mswin32]  
> I’m getting this as well… how do I fix?

the suggestion above was to install mysql 5.0.x

---

<div class="post-metadata">

**Author:** ![maged](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/51bf81/32.png) [@maged](https://www.ruby-forum.com/u/maged)\
**Post date:** [January 30, 2009, 11:41pm UTC](https://www.ruby-forum.com/t/ruby-mysql-error/157129/6 "2009-01-30T23:41:25Z")

</div>

On Jan 25, 7:50 am, prash [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > [BUG] Segmentation fault
> 
> so i assume you did “gem install mysql” or something similar.
> 
> hope that helps.  
> -prash.

Brilliant! I have been struggling all evening with this problem, and  
this solved it in minutes!

Thanks prash.
