<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>53517</bug_id>
          
          <creation_ts>2025-03-18 20:11:58 +0300</creation_ts>
          <short_desc>Неинициализированная константа BSON::BSON_RUBY при вызове функции insert()</short_desc>
          <delta_ts>2025-11-14 22:31:22 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>gem-em-mongo</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Богдан Богуславский">boguslavskijbj</reporter>
          <assigned_to name="majioa@altlinux.org">majioa</assigned_to>
          <cc>admsasha</cc>
    
    <cc>cas</cc>
    
    <cc>majioa</cc>
    
    <cc>mike</cc>
    
    <cc>nbr</cc>
    
    <cc>pav</cc>
    
    <cc>rider</cc>
    
    <cc>thatman</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>261363</commentid>
    <comment_count>0</comment_count>
    <who name="Богдан Богуславский">boguslavskijbj</who>
    <bug_when>2025-03-18 20:11:58 +0300</bug_when>
    <thetext>Стенды:
ALT Workstation K 11.0 (Обновленный до Sisyphus)
ALT Workstation 11.0 (Обновленный до Sisyphus)
ALT Server 11.0 (Обновленный до Sisyphus)

Версия пакета:
gem-em-mongo-0.6.1-alt1.noarch

Шаги воспроизведения:
1. Создать файл с кодом:
$ cat &gt; test.rb &lt;&lt; EOF
require &apos;eventmachine&apos;
require &apos;em-mongo&apos;

EM.run do
  conn = EM::Mongo::Connection.new(&apos;&lt;mongodb address&gt;&apos;, &lt;mongodb port&gt;)
  db = conn.db(&apos;test_db&apos;)
  collection = db.collection(&apos;test_collection&apos;)
  collection.insert(name: &apos;Test&apos;)
end
EOF

Заменить &lt;mongodb address&gt; и &lt;mongodb port&gt; на адрес и порт базы данных

2. Выполнить код:
$ ruby test.rb

Ожидаемый результат: успешное выполнение программы, ошибки в терминале отсутствуют

Реальный результат: ошибка в терминале после выполнения строки collection.insert(name: &apos;Test&apos;):
/usr/lib/ruby/gemie/gems/em-mongo-0.6.1/lib/em-mongo/collection.rb:771:in `insert_documents&apos;: uninitialized constant BSON::BSON_RUBY (NameError)

      BSON::BSON_RUBY.serialize_cstr(message, &quot;#{@db}.#{collection_name}&quot;)
          ^^^^^^^^^^^
        from /usr/lib/ruby/gemie/gems/em-mongo-0.6.1/lib/em-mongo/collection.rb:211:in `safe_insert&apos;
        from /usr/lib/ruby/gemie/gems/em-mongo-0.6.1/lib/em-mongo/collection.rb:182:in `insert&apos;
        from test.rb:9:in `block in &lt;main&gt;&apos;
        from /usr/lib/ruby/gemie/gems/eventmachine-1.3.1.4/lib/eventmachine.rb:196:in `run_machine&apos;
        from /usr/lib/ruby/gemie/gems/eventmachine-1.3.1.4/lib/eventmachine.rb:196:in `run&apos;
        from test.rb:4:in `&lt;main&gt;&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>277217</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2025-11-14 22:31:22 +0300</bug_when>
    <thetext>gem-em-mongo-0.6.1-alt2 -&gt; sisyphus:

Tue May 20 2025 Pavel Skrylev &lt;majioa@altlinux&gt; 0.6.1-alt2
- * rebased to upstream with plainrow tagging
- ! fixed spec and deps to newest bson 6x (ALT #53517)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>