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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.0.2
    • 2.0.3
    • GridFS
    • Mac OS X 10.10.3, RVM, Ruby 2.2

    Description

      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>'

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: