Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-897

Cant upload file into Mongo 3.0.1 using Ruby Driver 2.0.2

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.3
    • Affects Version/s: 2.0.2
    • Component/s: GridFS
    • Environment:
      Mac OS X 10.10.3, RVM, Ruby 2.2

      Can't upload file to Grid FS, after uploading Logging Fails

      Problems is in log method inside query.rb when Ruby Driver tries to get chunks of the file.

      ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/protocol/query.rb:81:in `inspect': string contains null byte (ArgumentError)
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/protocol/query.rb:81:in `inspect'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/protocol/query.rb:81:in `inspect'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/protocol/query.rb:81:in `log_message'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/loggable.rb:123:in `log_inspect'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/loggable.rb:50:in `block in log'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/loggable.rb:49:in `each'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/loggable.rb:49:in `ensure in log'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/loggable.rb:49:in `log'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/loggable.rb:65:in `log_debug'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/server/connectable.rb:65:in `dispatch'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/operation/executable.rb:35:in `block in execute'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/server/connection_pool.rb:99:in `with_connection'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/server/context.rb:62:in `with_connection'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/operation/executable.rb:34:in `execute'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/operation/write/insert.rb:71:in `execute_write_command'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/operation/write/insert.rb:61:in `execute'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/collection.rb:191:in `insert_many'
      from /Users/Artie/.rvm/gems/ruby-2.2.0/gems/mongo-2.0.2/lib/mongo/grid/fs.rb:78:in `insert_one'
      from /Users/Artie/Documents/Workspace/test/mongo/file_uploader.rb:26:in `upload_with_link'
      from /Users/Artie/Documents/Workspace/test/mongo/file_uploader.rb:5:in `upload'
      from start.rb:11:in `<main>'

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            artie18 Artyom Fedenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: