Skip to content
This repository was archived by the owner on Jan 11, 2022. It is now read-only.
This repository was archived by the owner on Jan 11, 2022. It is now read-only.

Rubypython interpreter doesn't start in presence of 'bson' gem. #29

@tauqs

Description

@tauqs

Rubypython.start doesn't work when bson gem is present in the requirements.

This is the code that I wrote:

require 'rubypython'
require 'bson'

RubyPython.start
sys = RubyPython.import("sys")
p sys.path
RubyPython.stop

When I run this code, Rubypython.start generates following error:

/usr/local/rvm/rubies/ruby-2.2.5/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/tauq/Documents/Oz/Tauqueer/cluster1/cluster.rb
/usr/local/rvm/gems/ruby-2.2.5/gems/rubypython-0.6.4/lib/rubypython/pymainclass.rb:50:in method_missing': undefined method class' for <module 'main' (built-in)>:RubyPython::PyMainClass (NoMethodError)
from /usr/local/rvm/gems/ruby-2.2.5/gems/bson-4.2.2/lib/bson/specialized.rb:36:in ==' from /usr/local/rvm/gems/ruby-2.2.5/gems/rubypython-0.6.4/lib/rubypython.rb:219:in ==='
from /usr/local/rvm/gems/ruby-2.2.5/gems/rubypython-0.6.4/lib/rubypython.rb:219:in block in notify' from /usr/local/rvm/gems/ruby-2.2.5/gems/rubypython-0.6.4/lib/rubypython.rb:218:in each'
from /usr/local/rvm/gems/ruby-2.2.5/gems/rubypython-0.6.4/lib/rubypython.rb:218:in notify' from /usr/local/rvm/gems/ruby-2.2.5/gems/rubypython-0.6.4/lib/rubypython.rb:77:in block in start'
from /usr/local/rvm/gems/ruby-2.2.5/gems/rubypython-0.6.4/lib/rubypython/python.rb:11:in synchronize' from /usr/local/rvm/gems/ruby-2.2.5/gems/rubypython-0.6.4/lib/rubypython/python.rb:11:in synchronize'
from /usr/local/rvm/gems/ruby-2.2.5/gems/rubypython-0.6.4/lib/rubypython.rb:54:in start' from /Users/tauq/Documents/Oz/Tauqueer/cluster1/cluster.rb:3:in <top (required)>'
from -e:1:in load' from -e:1:in

'

Process finished with exit code 1

========================================================================

This won't happen if I don't use bson gem. Please look into the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions