IRuby is a Ruby kernel for Jupyter project.
How to set up ZeroMQ depends on your environment. You can use one of the following libraries.
Install Jupyter with Anaconda (recommended).
CZTop requires CZMQ >= 4.0.0 and ZMQ >= 4.2.0. The official packages for Ubuntu 16.04 don't satisfy these version requrements, so you need to install from source.
sudo apt install libtool libffi-dev ruby ruby-dev make
sudo apt install git libzmq-dev autoconf pkg-config
git clone https://github.com/zeromq/czmq
cd czmq
./autogen.sh && ./configure && sudo make && sudo make install
Use official packages.
sudo apt install libtool libffi-dev ruby ruby-dev make
sudo apt install libzmq3-dev libczmq-dev
gem install cztop
gem install iruby --pre
iruby register --force
Install git and Jupyter with Anaconda (recommended). DevKit is necessary for building RubyGems with native C-based extensions.
Install ZeroMQ.
pacman -S mingw64/mingw-w64-x86_64-zeromq
gem install ffi-rzmq
gem install iruby --pre
iruby register --force
Install ruby with rbenv or rvm. Install Jupyter with Anaconda (recommended).
brew install automake gmp libtool wget
brew install zeromq --HEAD
brew install czmq --HEAD
# export LIBZMQ_PATH=$(brew --prefix zeromq)/lib
# export LIBCZMQ_PATH=$(brew --prefix czmq)/lib
# gem install cztop
gem install ffi-rzmq
gem install iruby --pre
iruby register --force
If you are using macports, run the following commands.
port install libtool autoconf automake autogen
gem install ffi-rzmq
gem install iruby
At first install IPython/Jupyter. There is a pyzmq ports (ports/net/py-pyzmq) which depends on libzmq4, however, it doesn't works with ipython. Therefore we use libzmq3 like the following:
- make your ports tree up-to-date.
- replace LIBDEPENDS line in ports/net/py-pyzmq/Makefile
LIB_DEPENDS= libzmq.so:${PORTSDIR}/net/libzmq4
with
LIB_DEPENDS= libzmq.so:${PORTSDIR}/net/libzmq3
- install related packages
sudo pkg install libzmq3 py27-qt4-gui py27-pexpect-3.3 py27-qt4-svg py27-pygments py27-Jinja2 py27-tornado py27-jsonschema
- make install using ports
cd /usr/ports/net/py-pyzmq
sudo make install
cd /usr/ports/devel/ipython
sudo make install
Then, install IRuby and related ports and gems.
sudo pkg install rubygem-mimemagic
sudo gem install ffi-rzmq # install ffi, ffi-rzmq-core and ffi-rzmq
git clone https://github.com/SciRuby/iruby.git
cd iruby
gem build iruby.gemspec
sudo gem install iruby-0.2.7.gem
You can use Java classes in your IRuby notebook.
- JRuby version >= 9.0.4.0
- cztop gem
- iruby gem
After installation, make sure that your env
is set up to use jruby.
$ env ruby -v
If you use RVM, it is enough to switch the current version to jruby.
If you have already used IRuby with a different version, you need to generate a new kernel:
$ iruby register --force
Take a look at the example notebook and the collection of notebooks which includes a Dockerfile to create a containerized installation of iruby and other scientific gems. You can find the prebuild image at dockerhub.
We welcome contributions from everyone.
See the CONTRIBUTORS file.
Copyright © 2013-19, IRuby contributors and the Ruby Science Foundation.
All rights reserved.
IRuby, along with SciRuby, is licensed under the MIT license. See the LICENSE file.