Hi, I am new to Rails and got the "Agile Web Dev with Rails book", following along with the examples...starting the Depot sample app, but am running into segmentation faults and my WEBrick console looks like this: <error> http://127.0.0.1:3000/admin/ -> /admin/show/1 c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller ration.rb:45: [BUG] Segmentation fault ruby 1.8.2 (2004-12-25) [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. </error> The core Ruby/Rails distribution source file that throws this error is not always the same (e.g my console says it has also been thrown by "c:/ruby/lib/ruby/1.8/webrick/accesslog.rb:51:") It doesnt always happen in the same action. Sometimes when I "Edit" a product, sometimes when I just cancel an edit or sometimes just doing a basic list action. It doesnt happen *every* time, somewhere around 50%. I did a search for "segmentation fault" on this list and I can see that others have experienced issues similar to this. Environment: Windows 2000 - Ruby: 1.8.2 - MySQL 5.0.16 on a separate Linux machine - latest Rails (1.1.2) - MySQL bindings retrieved via "gem install mysql" and then choosing Option 1( mysql 2.7.2006.05.10 (mswin32)" (I also tried a slightly dated version "mysql 2.7.2006.04.21", same result.. Thanks in advance /Cody Thanks!
on 2006-05-20 19:01
on 2006-05-20 19:22
Hi Cody, Cody Caughlan wrote: > I am new to Rails and got the "Agile Web Dev with Rails book", following > along with the examples...starting the Depot sample app, > but am running into segmentation faults and my WEBrick console looks like > this: Don't know for sure if this is your problem, but... One source of segmentation faults has been traced to an incompatibility with the compiled MySQL driver on Win2K (both a patch and a permanent fix are "in the works"). The quick workaround is to eliminate the compiled driver and let Rails pick up the native Ruby version (which it will automatically). Try renaming /ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/mysql.so to something (like mysql.sob ;-) ) and see if that helps. Best regards, Bill
on 2006-05-20 19:25
Bill- Thanks for the advice. Unfortunately, it did not work. Same seg fault message after my 3rd page request :) /Cody
on 2006-05-21 15:40
I had this same problem, and I'm still waiting for a fix. When's that patch coming out?
on 2006-05-21 19:12
Hi Cody, Cody Caughlan wrote: > Thanks for the advice. Unfortunately, it did not work. Same seg fault > message after my 3rd page request :) Sorry to hear that. I was hopeful but had my doubts given that you're running MySQL on a seperate box. So... I'm going to forward your initial posting to the developers who are working on the driver problem. With a little luck, they may see your problem as an opportunity ;-) As far as getting you going in the short term, if your situation allows, I'd recommend using a local version of MySQL for now. My earlier recommendation will definitely allow you to move forward with working through the AWD book. The least painful way to proceed, in my experience, is to use Instant Rails in the short term. It provides a standalone environment that's there when you need it but not 'integrated' into the rest of your environment so there's very little opportunity for conflict. You can pick it up here: http://instantrails.rubyforge.org/wiki/wiki.pl The 1.3a release uses the pure Ruby adapter which is what you'd want. HTH, Bill