Movatterモバイル変換


[0]ホーム

URL:


LoginSignup
4

Go to list of users who liked

2

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

macOS SierraでiRuby notebookの動作環境を手っ取り早く作る手順 without Homebrew

Last updated atPosted at 2016-07-27

はじめに

かなり苦労したけど、ようやく動作するようになったので一気通貫のインストール手順をまとめます。
ちなみに、コンパイルやインストール時のコマンド入力スタイルに統一感がないのはお許し下さい。

インストール

Jupyter notebook

以下のページを参照して、Jupyter notebookをインストール。
http://qiita.com/mix_dvd/items/d915752215db67919c06

autoconf

以下の手順でインストール。
※ rbczmqをインストールするための準備です。

$curl-OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz$tarxzf autoconf-latest.tar.gz$cdautoconf-*$./configure--prefix=/usr/local$make$sudomakeinstall

automake

以下の手順でインストール。
※ rbczmqをインストールするための準備です。

$curl-fL http://ftpmirror.gnu.org/automake/automake-1.15.tar.gz |tarxzf -$cdautomake-*$./configure--prefix=/usr/local$make$sudomakeinstall

libtool

以下の手順でインストール。
※ rbczmqをインストールするための準備です。

$curl-fL http://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz |tarxzf -$cdlibtool-*$./configure--prefix=/usr/local$make&&sudomakeinstall

rbenv

macOS Sierra(Beta)にはRuby 2.0が入っているのですが、iRubyにはRuby 2.1以上が必要なので、別バージョンのRubyを入れるための準備です。

[Webサイト]https://github.com/rbenv/rbenv

本体

以下の手順でインストール。

$git clone https://github.com/rbenv/rbenv.git ~/.rbenv$echo'export PATH="$HOME/.rbenv/bin:$PATH"'>> ~/.bash_profile$echo'eval "$(rbenv init -)"'>> ~/.bash_profile

やらなくてもいいみたいですが「動作が速くなるよ」って説明があったので、以下のコマンドを補足しておきます。

$cd ~/.rbenv&& src/configure&& make-C src

ruby-build

以下の手順でインストール。

$git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

Ruby 2.3系

rbenvを使ってインストール。
※2016/7/28現在、最新版は2.3.1でした。

$rbenvinstall-l |grep2.3  1.9.1-p243  2.2.3  2.3.0-dev  2.3.0-preview1  2.3.0-preview2  2.3.0  2.3.1  rbx-2.2.3  rbx-2.3.0$rbenvinstall2.3.1$rbenvlocal2.3.1$rbenv rehash

Rubyのバージョン確認。

$rbenv versions  system* 2.3.1(setby /Users/[ユーザー名]/.ruby-version)$ruby-vruby 2.3.1p112(2016-04-26 revision 54768)[x86_64-darwin16]

iRuby

以下の手順でインストール。

$geminstallrbczmq$geminstalliruby

起動

以下のコマンドで起動。

$iruby notebook

新しいノートを追加し、簡単な動作確認。

puts"test"

と入力して「test」と表示されることを確認。

スクリーンショット 2016-07-28 6.33.18.png

完璧!

機能の確認

以下のURLで機能を確認してみて下さい。

ちなみに、全てのサンプルを動作させるには、いくつかgemを追加インストールする必要があります。
また、別途gnuplotもインストールします。

gnuplotは以下のURLを参照
http://www.kashiyuki.com/entry/2016/07/04/143056

追加のgemは以下のとおり。

$geminstallpry$geminstallgnuplot$geminstallrubyvis$geminstallnyaplot

こんなのできちゃった!!

スクリーンショット 2016-07-28 15.01.33.png

4

Go to list of users who liked

2
0

Go to list of comments

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4

Go to list of users who liked

2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?


[8]ページ先頭

©2009-2025 Movatter.jp