Rails 2.3.8 - Segmentation Fault

I just upgraded to Rails 2.3.8 on my development machine. I created a standard Rails app, started up WEBrick, and got a Segmentation fault. Not enough code to be my error, so I searched for the core problem and possible solutions.

Turns out the issue is known, and a solution exists. First, I updated to the latest version of Ruby 1.8.6. Not 1.8.7, and certainly not 1.9.2. Too many people reported unresolved problems with Ruby 1.8.7, and Ruby 1.9.2 hasn’t yet gone stable. As of 16 June 2010, the latest version available as an exe for Windows is ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32].

Next, did a gem install rails (version 2.3.8). Third, a gem install mysql (2.8.1 x86-mingw32). This gave errors for the documentation, but the gem installs.

Finally, I copied libmySQL.dll (1484 KB) from http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll as recommended at http://forums.aptana.com/viewtopic.php?f=20&t=7563&p=27407&hilit=libmysql.dll#p27407 . After that, everything just works.

4 comments to Rails 2.3.8 – Segmentation Fault

  • kotini

    works fine thanks a lot

  • Sarai Rockwell

    There’s an easier way to do it in Rails 3. mysql2 gem has replaced mysql gem, and it’s all using consistent dlls.

  • Woot. I had some problem here with Rails 2.3.8 and Ruby 1.8.7 on Windows 7 and your post just save my day.

  • David Mann

    I found that the last step, using the instantrails dll, solved my problem on Win 7 x64 without my having to change ruby or rails versions.
    ruby -v
    ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
    rails -v
    Rails 3.2.0
    gem search mysql
    *** LOCAL GEMS ***
    mysql (2.8.1 x86-mingw32)

    Thank you so much!

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>