Skip to content

iruby does not install/work with Ubuntu snap install of ruby? #310

@wesinator

Description

@wesinator

Thanks for the work on iruby

TL,DR: Does anyone know how to get iruby to work with the snap install of ruby?
(the snap is an official build from rubylang dev team)

So I have Ubuntu 20.04 running ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux] ,
installed from the official snap package https://snapcraft.io/ruby

I followed the install instructions from https://github.com/SciRuby/iruby#ubuntu-17, without apt install ruby packages since they and gem/bundle are already installed from the snap.

/snap/bin/gem
3.2.22

When I try to run iruby:

$ iruby

Command 'iruby' not found, did you mean:

$ find . -name iruby

./.gem/bin/iruby
./.gem/ruby/3.0.0/bin/iruby
./.gem/ruby/3.0.0/doc/iruby-0.7.4/ri/lib/iruby
./.gem/ruby/3.0.0/gems/iruby-0.7.4/bin/iruby
./.gem/ruby/3.0.0/gems/iruby-0.7.4/test/iruby
./.gem/ruby/3.0.0/gems/iruby-0.7.4/lib/iruby
./.gem/doc/iruby-0.7.4/ri/lib/iruby
./.gem/gems/iruby-0.7.4/bin/iruby
./.gem/gems/iruby-0.7.4/test/iruby
./.gem/gems/iruby-0.7.4/lib/iruby

I then ran ./.gem/bin/iruby register --force

After that ruby is an option in jupyter notebook, jupyter lab, but code highlighting doesn't work , and the ruby code cell run indefinitely without output:
image

Kernel started: b29eec45-b6f0-4247-9738-ced8cd296a6b
W, [2021-09-20T08:45:53.031339 #5168]  WARN -- : Could not load bundler: Could not locate Gemfile or .bundle/ directory
Unable to load this gem. The libzmq library (or DLL) could not be found.
If this is a Windows platform, make sure libzmq.dll is on the PATH.
If the DLL was built with mingw, make sure the other two dependent DLLs,
libgcc_s_sjlj-1.dll and libstdc++6.dll, are also on the PATH.
For non-Windows platforms, make sure libzmq is located in this search path:
["/home/w/.gem/gems/ffi-rzmq-core-1.0.7/lib/ffi-rzmq-core/../../ext/libzmq.so", "/home/w/.local/bin/libzmq.so", "/usr/local/sbin/libzmq.so", "/usr/local/bin/libzmq.so", "/usr/sbin/libzmq.so", "/usr/bin/libzmq.so", "/sbin/libzmq.so", "/bin/libzmq.so", "/usr/games/libzmq.so", "/usr/local/games/libzmq.so", "/snap/bin/libzmq.so", "/snap/ruby/220/lib/libzmq.so", "/usr/local/lib/libzmq.so", "/opt/local/lib/libzmq.so", "/usr/lib64/libzmq.so"]
W, [2021-09-20T08:45:53.061577 #5168]  WARN -- : parent process poller thread started.

zeromq is installed through libzmq3-dev

Also, after quitting iruby, (ctrl-c + y to exit), it seemed there was still a ruby child process consuming CPU.

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions