You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IRuby is a Ruby kernel for [Jupyter project](http://try.jupyter.org/).
6
7
7
-
## Quick start
8
-
The installation instructions are divided according to environments mainly because of ZeroMQ.
8
+
## Installation
9
+
How to set up [ZeroMQ](http://zeromq.org/) depends on your environment.
10
+
You can use one of the following libraries.
11
+
*[CZTop](https://gitlab.com/paddor/cztop) and [CZMQ](https://github.com/zeromq/czmq) >= 4.0.0
12
+
*[ffi-rzmq](https://github.com/chuckremes/ffi-rzmq) and [libzmq
13
+
](https://github.com/zeromq/libzmq) >= 3.2
9
14
10
15
### Ubuntu
11
-
At first install Jupyter. I recommend an installation using [Anaconda](https://www.continuum.io/downloads) Python 3.6 version.
16
+
Install Jupyter with [Anaconda](https://www.anaconda.com/) (recommended).
12
17
13
-
#### Preparing dependencies on 16.04
14
-
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.
18
+
#### Setup ZeroMQ on Ubuntu 16.04
19
+
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.
15
20
16
21
```shell
17
22
sudo apt install libtool libffi-dev ruby ruby-dev make
@@ -21,59 +26,56 @@ cd czmq
21
26
./autogen.sh && ./configure && sudo make && sudo make install
22
27
```
23
28
24
-
#### Preparing dependencies on 17.04
25
-
In 17.04, you can use official packages.
29
+
#### Setup ZeroMQ on Ubuntu 17.04 to 18.10
30
+
Use official packages.
26
31
27
32
```shell
28
33
sudo apt install libtool libffi-dev ruby ruby-dev make
29
34
sudo apt install libzmq3-dev libczmq-dev
30
35
```
31
36
32
-
#### Version-independent things
33
-
After preparing dependencies, install the Ruby gem.
34
-
37
+
#### Install CZTop and IRuby
35
38
```shell
36
-
gem install cztop iruby
39
+
gem install cztop
40
+
gem install iruby --pre
37
41
iruby register --force
38
42
```
39
43
40
-
Now you can select Ruby kernel in Jupyter Notebook with:
41
-
42
-
jupyter-notebook
43
-
44
44
### Windows
45
-
At first install **git** and Jupyter. I recommend an installation using [Anaconda](https://www.continuum.io/downloads).
46
-
47
-
Run the following commands on **Ruby command prompt**:
45
+
Install git and Jupyter with [Anaconda](https://www.anaconda.com/) (recommended).
46
+
[DevKit](https://rubyinstaller.org/add-ons/devkit.html) is necessary for building RubyGems with native C-based extensions.
48
47
49
48
```shell
50
49
gem install cztop
51
-
gem install iruby
50
+
gem install iruby --pre
52
51
iruby register --force
53
52
```
54
53
55
-
Now you can select Ruby kernel in Jupyter Notebook with:
54
+
### macOS
55
+
Install ruby with rbenv or rvm.
56
+
Install Jupyter with [Anaconda](https://www.anaconda.com/) (recommended).
56
57
57
-
jupyter-notebook
58
-
59
-
### Mac
60
-
I recommend an installation using [Anaconda](https://www.continuum.io/downloads).
58
+
#### Homebrew
59
+
```shell
60
+
brew install automake gmp libtool wget
61
+
brew install zeromq --HEAD
62
+
brew install czmq --HEAD
63
+
```
61
64
62
-
After that, run the following commands.
65
+
Setup environment variables.
66
+
```
67
+
export LIBZMQ_PATH=$(brew --prefix zeromq)/lib
68
+
export LIBCZMQ_PATH=$(brew --prefix czmq)/lib
69
+
```
63
70
64
71
```shell
65
-
brew install rbenv automake gmp libtool wget
66
-
rbenv install 2.4.1
67
-
rbenv global 2.4.1
68
-
echo'eval "$(rbenv init -)"'>>~/.bashrc
69
-
source~/.bashrc
70
-
71
-
brew install zeromq
72
-
brew install czmq --HEAD
73
-
gem install cztop iruby
72
+
gem install cztop
73
+
# gem install ffi-rzmq
74
+
gem install iruby --pre
74
75
iruby register --force
75
76
```
76
77
78
+
#### MacPorts
77
79
If you are using macports, run the following commands.
78
80
79
81
```shell
@@ -82,89 +84,80 @@ gem install ffi-rzmq
82
84
gem install iruby
83
85
```
84
86
85
-
86
87
### FreeBSD
87
-
88
88
At first install IPython/Jupyter.
89
89
There is a pyzmq ports (ports/net/py-pyzmq) which depends on libzmq4, however, it doesn't works with ipython.
90
90
Therefore we use libzmq3 like the following:
91
91
92
92
1. make your ports tree up-to-date.
93
93
2. replace LIBDEPENDS line in ports/net/py-pyzmq/Makefile
Since jRuby is fully compatible with Ruby version 2.2, it is possible to use iruby with jRuby.
127
-
It can be helpful if you want to use java classes in your iruby notebook.
128
-
This will require the following software:
129
-
*jRuby version >= 9.0.4.0
109
+
```shell
110
+
cd /usr/ports/net/py-pyzmq
111
+
sudo make install
112
+
cd /usr/ports/devel/ipython
113
+
sudo make install
114
+
```
115
+
Then, install IRuby and related ports and gems.
116
+
```shell
117
+
sudo pkg install rubygem-mimemagic
118
+
sudo gem install ffi-rzmq # install ffi, ffi-rzmq-core and ffi-rzmq
119
+
git clone https://github.com/SciRuby/iruby.git
120
+
cd iruby
121
+
gem build iruby.gemspec
122
+
sudo gem install iruby-0.2.7.gem
123
+
```
124
+
125
+
### Installation for JRuby
126
+
127
+
You can use Java classes in your IRuby notebook.
128
+
129
+
*JRuby version >= 9.0.4.0
130
130
* cztop gem
131
-
* this iruby gem
131
+
* iruby gem
132
+
133
+
After installation, make sure that your `env` is set up to use jruby.
132
134
133
-
After installation, make sure that your `env` is set up to jruby.
134
135
```shell
135
136
$ env ruby -v
136
137
```
138
+
137
139
If you use RVM, it is enough to switch the current version to jruby.
138
-
If you have already used iruby with a different version, you need to generate a new kernel:
140
+
141
+
If you have already used IRuby with a different version, you need to generate a new kernel:
142
+
139
143
```shell
140
144
$ iruby register --force
141
145
```
142
-
After that you can use iruby with jRuby in usual way.
143
-
144
-
## After the installation
145
146
147
+
## Notebooks
146
148
Take a look at the [example notebook](http://nbviewer.ipython.org/urls/raw.github.com/SciRuby/sciruby-notebooks/master/getting_started.ipynb)
147
149
and the [collection of notebooks](https://github.com/SciRuby/sciruby-notebooks/) which includes a Dockerfile to create a containerized installation of iruby
148
150
and other scientific gems. You can find the prebuild image at [dockerhub](https://registry.hub.docker.com/u/minad/sciruby-notebooks/).
149
151
150
-
151
-
## Required dependencies
152
-
153
-
* Jupyter >= 3.0.0
154
-
* Ruby >= 2.1.0
155
-
156
-
If you install IRuby with CZTop, CZMQ >= 4.0.0 is added to the list above.
157
-
158
-
If you install IRuby with ffi-rzmq, libzmq >= 3.2 is added to the list above.
0 commit comments