Forum: Ruby ruby mysql error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Acda0b5fa12fba96c056fa9d95c06b8a?d=identicon&s=25 Maged Makled (maged)
on 2009-01-07 17:15
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
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2009-01-08 07:35
Maged Makled 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]
http://www.akitaonrails.com/2008/7/26/still-playin...

can install some mingw gems via:
gem list --remote --source http://gems.rubyinstaller.org
32a75527aaf7037e10c0b597e12949b7?d=identicon&s=25 prash (Guest)
on 2009-01-25 08:55
(Received via mailing list)
On Jan 7, 11:14 am, Maged Makled <almig...@gmail.com> 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.
Ac7dc76ac085007cf97f7127786ef146?d=identicon&s=25 unknown (Guest)
on 2009-01-30 23:41
(Received via mailing list)
On Jan 25, 7:50 am, prash <ipr...@gmail.com> 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.
3d61a8dbbd64d0feed8698689cf15276?d=identicon&s=25 Jayce Meade (Guest)
on 2009-02-12 09:09
(Received via mailing list)
=> Booting WEBrick...
=> Rails 2.2.2 application started on 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: <nickcwebb8@googlemail.com>
Sent: Friday, January 30, 2009 2:37 PM
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Subject: Re: ruby mysql error
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2009-02-14 07:56
> 
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
This topic is locked and can not be replied to.