Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
I

iruby

> 编程语言
Open source

Official gem repository: Ruby kernel for Jupyter/IPython Notebook

927 stars0 likes4 views
WebsiteGitHub

About

Official gem repository: Ruby kernel for Jupyter/IPython Notebook

IRuby

IRuby is a Ruby kernel for Jupyter project.

Installation

Requirements

  • Jupyter

The following requirements are automatically installed.

  • ffi-rzmq
  • libzmq

The following dependencies are optional.

  • Pry, if you want to use Pry instead of IRB for the code execution backend

Installing Jupyter Notebook and/or JupyterLab

See the official document to know how to install Jupyter Notebook and/or JupyterLab.

Ubuntu

Ubuntu 22.04+

bash
sudo apt install libtool libffi-dev ruby ruby-dev make

gem install --user-install rubygems-requirements-system
gem install --user-install iruby
iruby register --force

Fedora

Fedora 40+

bash
sudo dnf install ruby ruby-dev make zeromq-devel

gem install --user-install rubygems-requirements-system
gem install --user-install iruby
iruby register --force

Windows

DevKit is necessary for building RubyGems with native C-based extensions.

bash
gem install iruby
iruby register --force

macOS

Install ruby with rbenv or rvm. Install Jupyter.

Homebrew

bash
gem install rubygems-requirements-system
gem install iruby
iruby register --force

MacPorts

If you are using macports, run the following commands.

bash
port install libtool autoconf automake autogen
gem install rubygems-requirements-system
gem install iruby
iruby register --force

Docker

Try RubyData Docker Stacks. Running jupyter notebook:

bash
docker run --rm -it -p 8888:8888 rubydata/datascience-notebook

Installation for JRuby

You can use Java classes in your IRuby notebook.

  • JRuby version >= 9.0.4.0
  • iruby gem

After installation, make sure that your env is set up to use jruby.

bash
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:

bash
iruby register --force

Install the development version of IRuby

Be careful to use the development version because it is usually unstable.

If you want to install the development version of IRuby from the source code, try specific_install.

gem specific_install https://github.com/SciRuby/iruby

Note for using with CZTop and CZMQ

CZTop adapter has been deprecated since IRuby version 0.7.4. It will be removed after several versions.

If you want to use IRuby with CZTop, you need to install it and CZMQ.

If both ffi-rzmq and cztop are installed, ffi-rzmq is used. If you prefer cztop, set the following environment variable.

bash
export IRUBY_SESSION_ADAPTER="cztop"

Backends

There are two backends: PlainBackend and PryBackend.

  • PlainBackend is the default backend. It uses IRB.
  • PryBackend uses Pry.

You can switch the backend to PryBackend by running the code below.

ruby
IRuby::Kernel.instance.switch_backend!(:pry)

Notebooks

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.

Try IRuby

  • Try a sample notebook on Binder

  • Launch JupyterLab on Binder

Contributing

Contributions to IRuby are very welcome.

To former contributors

In February 2021, IRuby became the canonical repository and is no longer a fork from minrk/iruby. Please fork from this repository again before making pull requests.

License

Copyright (c) IRuby contributors and the Ruby Science Foundation.

Licensed under the MIT license.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rubyinteractivejupyterreplruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言