# Ruby on Rails, Vista, and Segmentation Faults

**URL:** <https://www.ruby-forum.com/t/ruby-on-rails-vista-and-segmentation-faults/138294>\
**Category:** Ruby\
**Created:** [May 21, 2008, 6:49pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-vista-and-segmentation-faults/138294 "2008-05-21T18:49:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ad7895/32.png) [@bobf](https://www.ruby-forum.com/u/bobf)\
**Post date:** [May 21, 2008, 6:49pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-vista-and-segmentation-faults/138294/1 "2008-05-21T18:49:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bobf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ad7895/32.png) [@bobf](https://www.ruby-forum.com/u/bobf)\
**Post date:** [May 21, 2008, 8:46pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-vista-and-segmentation-faults/138294/2 "2008-05-21T20:46:47Z")

</div>

-----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](http://twitter.com/cynicalryan)  
Blog: [http://justarubyist.blogspot.com](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](http://enigmail.mozdev.org)

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

---

<div class="post-metadata">

**Author:** ![bobf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ad7895/32.png) [@bobf](https://www.ruby-forum.com/u/bobf)\
**Post date:** [May 21, 2008, 10:42pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-vista-and-segmentation-faults/138294/3 "2008-05-21T22:42:09Z")

</div>

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](http://www.ruby-forum.com/topic/114969)

Swtiching to json\_pure seems to have fixed it.

---

<div class="post-metadata">

**Author:** ![bobf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ad7895/32.png) [@bobf](https://www.ruby-forum.com/u/bobf)\
**Post date:** [May 21, 2008, 10:51pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-vista-and-segmentation-faults/138294/4 "2008-05-21T22:51:42Z")

</div>

-----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](http://www.ruby-forum.com/topic/114969)  
|  
| 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](http://twitter.com/cynicalryan)  
Blog: [http://justarubyist.blogspot.com](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](http://enigmail.mozdev.org)

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