I tried to test rubypython
with the following:
bundle exec irb
require 'rubypython'
RubyPython.start
This resulted in an error.
The error message is:
Python-2.7.5 python --version
Python 2.7.6
➜ Python-2.7.5 cd ..
➜ code ls
design Gemfile Gemfile.lock Python-2.7.5 Python-2.7.5.tgz ratelimit_spec.rb
➜ code bundle exec irb
irb(main):001:0> require 'rubypython'
=> true
irb(main):002:0> RubyPython.start
RubyPython::InvalidInterpreter: An invalid interpreter was specified.
Python 2.7 has been installed:
irb(main):002:0> RubyPython.start(:python_exec => 'python2.7')
RubyPython::InvalidInterpreter: An invalid interpreter was specified.
from /home/nitrous/code/.bundle/gems/rubypython-0.6.3/lib/rubypython.rb:67:in `block in start'
from /home/nitrous/code/.bundle/gems/rubypython-0.6.3/lib/rubypython/python.rb:10:in `synchronize'
from /home/nitrous/code/.bundle/gems/rubypython-0.6.3/lib/rubypython/python.rb:10:in `synchronize'
from /home/nitrous/code/.bundle/gems/rubypython-0.6.3/lib/rubypython.rb:54:in `start'
from (irb):2
from /usr/local/opt/rbenv/versions/2.1.5/bin/irb:11:in `<main>'
The documentation suggested that I would be able to run Python that has been imported using Ruby and, in my case, test via Rspec, but it doesn't.
Should I be able to import and then run Python from within Ruby?