Luis Lavena wrote in post #998653:
> On May 13, 5:03pm, "Glory L." <glory.lo... / 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?
>>
>> 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


---
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/.