Ruby on Rails, Vista, and Segmentation Faults

I’ve just switched from Window XP to a new Vista machine and my Rails
app is crashing with apparently random segmentation faults – each time
seems to be in a different location. Has anyone else had a similar
experience and, if so, is there a solution? I’ve spent some time
googling around for information but I don’t have a clear picture about
ruby support on Vista. Some people are clearly having problems with
ruby and vista but others say things are working for them. I’m running
ruby 1.8.6, rails 2.0.3, and mysql 5.0. Any help would be greatly
appreciated.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bob Florian wrote:
| I’ve just switched from Window XP to a new Vista machine and my Rails
| app is crashing with apparently random segmentation faults – each time
| seems to be in a different location. Has anyone else had a similar
| experience and, if so, is there a solution? I’ve spent some time
| googling around for information but I don’t have a clear picture about
| ruby support on Vista. Some people are clearly having problems with
| ruby and vista but others say things are working for them. I’m running
| ruby 1.8.6, rails 2.0.3, and mysql 5.0. Any help would be greatly
| appreciated.

Off the top of my head:

    • How are you running Ruby/Rails? Administrator (i.e. via ‘Run as…’,
      or
      as the higher-privileged-but-not-quite-and-actual-admin admin account)?
    • Could you stack trace the segfault? Chances are, it is always at the
      same location, code-wise, but Vista distributes memory in a
      randomish-way to make buffer overflows more difficult.
    • Is Ruby installed into a directory where only an elevated account
      has
      write access (i.e. %windir%\Programs, or something similar)?

I’ve had no issue with Ruby installed into %windir%\Ruby on Vista in
both RC2 and RTM pre-SP1.


Phillip G.
Twitter: twitter.com/cynicalryan
Blog: http://justarubyist.blogspot.com

~ “I’m a simple man with complex tastes.” -Calvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkg0beIACgkQbtAgaoJTgL9HxACeMMBJgOFJkQMG3X5KUTxj6Pe9
+JAAn255sRIcl7w0FnW8wqGgjnJcZE+7
=oicv
-----END PGP SIGNATURE-----

Thank you for the suggestions, Phillip. My specific problem appears to
have been caused by the json gem, which is the subject of another
posting:

http://www.ruby-forum.com/topic/114969

Swtiching to json_pure seems to have fixed it.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bob Florian wrote:
| Thank you for the suggestions, Phillip. My specific problem appears to
| have been caused by the json gem, which is the subject of another
| posting:
|
| Segfault in JSON - windows VISTA - Ruby - Ruby-Forum
|
| Swtiching to json_pure seems to have fixed it.

Then you should log a bug against the JSON gem.


Phillip G.
Twitter: twitter.com/cynicalryan
Blog: http://justarubyist.blogspot.com

Dumb Terminal - doesn’t understand what you’re trying to get it to
do. Intelligent Terminal - one that does understand what you’re trying
to do, but is clever enough to screw up in an interesting way.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkg0i04ACgkQbtAgaoJTgL/WOQCfXEJuwEyFinGxpGuHLJiqIBdz
WnMAoIfk7ALM6HzwxjGYkGdcNd9nsy2K
=+zc1
-----END PGP SIGNATURE-----