Ruby.exe crashing on windows xp

Hi there,

I am using ruby 1.9.2p180 and with rails 3.0 but I am getting ruby.exe
to crash fairly often. I understand this is a ruby forum over rails yet
I do not know what is the culprit. I have seen Rails 3.0 with a simple
web app work so I am baffled. I switched to using Mongoid/Haml and
started creating an app with application templates. The crash often
happens when I submit a form in a view and even a simple valid case can
crash ruby.exe. There is no errors written to the development log so I
have no trace from an application level.

Has anyone else experienced this? I am running Ruby on Windows XP.
Attached is the crash file. I am hoping this can go into the right
person as this issue halts my progress.

Attachments:
http://www.ruby-forum.com/attachment/6196/f7ce_appcompat.txt

···

--
Posted via http://www.ruby-forum.com/.

What is the GNU Database Manager thingy that's running on your machine?

My guess is that this thing is loaded into your Ruby process at some
point in time, which results in a crash, since this GNU thing is built
with Microsoft's compiler, and Ruby on Windows is built, well, not
with Microsoft's compiler.

So, can you provide the output of "gem list", and describe exactly (or
at least as exact as you possibly can) what you are doing? And, of
course, any source code that triggers the crash would be helpful as
well. :slight_smile:

···

On Fri, May 13, 2011 at 7:31 AM, Glory L. <glory.lo778@gmail.com> wrote:

Has anyone else experienced this? I am running Ruby on Windows XP.
Attached is the crash file. I am hoping this can go into the right
person as this issue halts my progress.

--
Phillip Gawlowski

Though the folk I have met,
(Ah, how soon!) they forget
When I've moved on to some other place,
There may be one or two,
When I've played and passed through,
Who'll remember my song or my face.

I am using ruby 1.9.2p180 and with rails 3.0 but I am getting ruby.exe
to crash fairly often.

crash log?
-r

···

--
Posted via http://www.ruby-forum.com/\.

Thanks for the prompt response.

Since I never got this problem with SQLite3 there may be something with
Mongoid, BSON_ext, or MongoDB. I got the MongoDB binaries so are you
suggesting I compile the source on my Windows box?

Here's my gem list.

This is my gem list.

abstract (1.0.0)
actionmailer (3.0.7, 3.0.0)
actionpack (3.0.7, 3.0.0)
activemodel (3.0.7, 3.0.0)
activerecord (3.0.7, 3.0.0)
activeresource (3.0.7, 3.0.0)
activesupport (3.0.7, 3.0.0)
arel (2.0.9, 1.0.1)
babosa (0.3.3, 0.2.0)
bcrypt-ruby (2.1.4 x86-mingw32)
bson (1.3.1, 1.3.0)
bson_ext (1.3.1, 1.3.0)
builder (2.1.2)
bundler (1.0.12)
cancan (1.6.4)
carrierwave (0.5.3)
chunky_png (1.2.0, 1.1.1)
compass (0.11.1)
decent_exposure (1.0.1)
devise (1.3.4, 1.3.3, 1.1.3)
devise_invitable (0.4.2)
diff-lcs (1.1.2)
erubis (2.6.6)
factory_girl (1.3.3)
factory_girl_rails (1.0.1)
formtastic (1.2.3)
friendly_id (3.2.1.1, 3.1.7)
fssm (0.2.7)
haml (3.1.1)
haml-rails (0.3.4)
hpricot (0.8.4)
i18n (0.5.0, 0.4.1)
mail (2.2.19, 2.2.17, 2.2.6.1)
mime-types (1.16)
mini_magick (3.2.1)
minitest (1.6.0)
mocha (0.9.12)
mongo (1.3.1, 1.3.0)
mongo_ext (0.19.3)
mongoid (2.0.1)
nokogiri (1.4.4.1 x86-mingw32)
orm_adapter (0.0.5, 0.0.4)
polyglot (0.3.1)
rack (1.2.2, 1.2.1)
rack-mount (0.6.14, 0.6.13)
rack-test (0.5.7, 0.5.6)
rails (3.0.7, 3.0.0)
railties (3.0.7, 3.0.0)
rake (0.8.7)
rdoc (2.5.8)
rspec (2.5.0)
rspec-core (2.5.2)
rspec-expectations (2.5.0)
rspec-mocks (2.5.0)
rspec-rails (2.5.0)
ruby_parser (2.0.6)
rubygems-update (1.6.2)
sass (3.1.1)
sexp_processor (3.0.5)
sqlite3 (1.3.3 x86-mingw32)
sqlite3-ruby (1.3.1 x86-mingw32)
subexec (0.0.4)
thor (0.14.6, 0.14.2)
treetop (1.4.9, 1.4.8)
tzinfo (0.3.27, 0.3.26, 0.3.23)
warden (1.0.4, 1.0.3, 0.10.7)
webrat (0.7.3)
will_paginate (3.0.pre2)

I just create a rails app with this Windows template

https://github.com/glorylo/Rails-3-Windows-Application-Template

* Requires Git Windows installed and simply run this under windows CMD
instead of Cygwin (since I did not install git on Cygwin)

Application uses Mongoid, Haml, and other gems. Create a model with a
few fields and simple go to the resource such as
http://localhost:3000/mymodel/new and submit the form.

Very frequently this crashes. There is no errors on on development log
and Ruby.exe crashes with Microsoft pop-up suggesting I send crash log
(see above for attachment).

···

--
Posted via http://www.ruby-forum.com/.

There is no errors written to the development log so I
have no trace from an application level.

Run it through gdb and see what the backtrace is?

···

--
Posted via http://www.ruby-forum.com/\.

In my short exploration of using Rails 3 with MongoDB on Windows, I
didn't experience any crash under similar circumstances to yours.

I have bson_ext installed, but I *also* have the Ruby DevKit
installed, which allows compilation of (a lot of) gems requiring C
extensions.

It is possible, though I don't know for sure, that the version of
bson_ext you end up with is built with the Microsoft Visual C++
compiler, thus causing Ruby to crash.

Try installing bson_ext with the DevKit installed:
http://rubyinstaller.org/add-ons/devkit/

Don't worry, it takes care of setting up the necessary build tools,
and gets loaded on demand. :slight_smile:

···

On Fri, May 13, 2011 at 10:03 PM, Glory L. <glory.lo778@gmail.com> wrote:

Thanks for the prompt response.

Since I never got this problem with SQLite3 there may be something with
Mongoid, BSON_ext, or MongoDB. I got the MongoDB binaries so are you
suggesting I compile the source on my Windows box?

--
Phillip Gawlowski

Though the folk I have met,
(Ah, how soon!) they forget
When I've moved on to some other place,
There may be one or two,
When I've played and passed through,
Who'll remember my song or my face.

Thanks for the prompt response.

Since I never got this problem with SQLite3 there may be something with
Mongoid, BSON_ext, or MongoDB. I got the MongoDB binaries so are you
suggesting I compile the source on my Windows box?

Here's my gem list.

I don't see nothing strange in your gem list, bson_ext has a fallback
to use pure-ruby code in case no compiler is detected.

Application uses Mongoid, Haml, and other gems. Create a model with a
few fields and simple go to the resource such ashttp://localhost:3000/mymodel/newand submit the form.

Very frequently this crashes. There is no errors on on development log
and Ruby.exe crashes with Microsoft pop-up suggesting I send crash log
(see above for attachment).

Are you starting the rails server from the console?

Can you provide us what is the last sentences before the crash?

Normally Ruby will print out the offending line that triggered the
crash before terminating itself.

If you're not starting the ruby.exe process from console, what are you
using instead?

···

On May 13, 5:03 pm, "Glory L." <glory.lo...@gmail.com> wrote:

--
Luis Lavena

Luis Lavena wrote in post #998653:

Thanks for the prompt response.

Since I never got this problem with SQLite3 there may be something with
Mongoid, BSON_ext, or MongoDB. I got the MongoDB binaries so are you
suggesting I compile the source on my Windows box?

Here's my gem list.

I don't see nothing strange in your gem list, bson_ext has a fallback
to use pure-ruby code in case no compiler is detected.

Application uses Mongoid, Haml, and other gems. Create a model with a
few fields and simple go to the resource such

ashttp://localhost:3000/mymodel/newand submit the form.

Very frequently this crashes. There is no errors on on development log
and Ruby.exe crashes with Microsoft pop-up suggesting I send crash log
(see above for attachment).

Are you starting the rails server from the console?

Yes, the crash still occurs. I did install Devkit with my rails so I
don't think that is the culprit.

Anyhow, I start my rails app with 'rails s' (the standard affair).

Can you provide us what is the last sentences before the crash?

I get this pop with the following:
ruby.exe has encountered a problem and needs to be close. We are sorry
for the inconvenience.

If you are in the middle of something, the information you were working
on might be lost.

Please tell Microsoft about this problem.
We have created an error report that you can send to us. We will treat
this report as confidential and anonymous.

Details:
AppName: ruby.exe AppVer: 1.9.2.180 ModName: msvcrt-ruby191.dll
ModVer: 1.9.2.180 Offset: 0011a00e

Normally Ruby will print out the offending line that triggered the

crash before terminating itself.

There is nothing printed in the development log (i.e. there is no stack
trace shown through 'rails server') so where do I go about culprit line?

I am trying to get a simple app to test with carrierwave (File uploads)
and using Mongoid's Grid FS. Submitting the form often crashes it

Simple Model

class Video
  include Mongoid::Document
  field :name
  field :url
  field :description
  mount_uploader :image, ImageUploader

  validates_presence_of :name

end

···

On May 13, 5:03pm, "Glory L." <glory.lo...@gmail.com> wrote:

---
Uploader

class ImageUploader < CarrierWave::Uploader::Base
  include CarrierWave::MiniMagick
  storage :grid_fs

  def store_dir
    "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
  end
end

----
Form

%h2 Form

= form_for(@video, :html => { :multipart => true }) do |f|
  - if @video.errors.any?
    #error_explanation
    %h2= pluralize(@video.errors.count, "error") |
    prohibited this thing from being saved:

    %ul
      - @video.errors.full_messages.each do |msg|
        %li= msg

  = f.label :name, "Name"
  = f.text_field :name
  %br

  = f.label :url, "Link Url"
  = f.text_field :url
  %br
  = f.label :description, "Description"
  %br
  = f.text_area :description
  %br

  = f.label :image
  = f.file_field :image

  .actions
    = f.submit
---

I'm try to eliminate some variables by using Mongoid without Grid FS or
what not and see if I can track down what exactly is crashing this. Any
ideas is appreciated.

--
Posted via http://www.ruby-forum.com/\.