Skip to content

Commit 4ac6542

Browse files
committed
Rename and added contents for snap release.
1 parent 6dc64de commit 4ac6542

File tree

3 files changed

+74
-10
lines changed

3 files changed

+74
-10
lines changed

en/news/_posts/2018-11-08-short-title.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

en/news/_posts/2018-11-08-snap.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout: news_post
3+
title: The official ruby snap is available
4+
author: Hiroshi SHIBATA
5+
translator:
6+
date: 2018-11-08 14:58:28 +0000
7+
lang: en
8+
---
9+
10+
We released the official snap package of Ruby language.
11+
12+
https://snapcraft.io/ruby
13+
14+
snap is the package system developed by Canonical. You can distribute the package with necessary libraries by using snap. It solved the problem that users can not use any versions of Ruby interpreter when using Linux distribution package system like rpm or apt.
15+
16+
For Ubuntu 16.04 or later distribution, you can use Ruby snap with the following command.
17+
18+
    sudo snap install ruby -classic
19+
20+
When you use the Linux distributions other than Ubuntu, Please refer to https://docs.snapcraft.io/installing-snapd/6735.
21+
22+
Ruby snap uses the feature called channel to distribute the currently maintained version. For example, if you do not specify a channel at 2018/11, It will be installed 2.5.3. but if you want to use Ruby 2.4, specify it as follows.
23+
24+
    sudo snap install ruby --classic --channel=2.4/stable
25+
26+
Multiple Ruby versions can be used with the snap feature. For example, to switch to Ruby 2.3, execute the following command.
27+
28+
    sudo snap switch ruby --channel=2.3/stable
29+
    sudo snap refresh
30+
31+
The Ruby snap has set `$HOME/.gem` to `GEM_HOME` and `GEM_PATH` environmental variables. Therefore, if you want to execute commands such as rails and rspec without using `bundle exec`, you need to set the following lines to` .bashrc` and so on.
32+
33+
    eval `ruby.env`
34+
35+
Since `$HOME/.gem` is shared by multiple versions, if you switch versions and use them, you will need to recompile C extensions using the `gem pristine` command.
36+
37+
This ruby snap released the official version for the first time with the snapcraft summit held at the canonical office in London on 6-8 Nov, 2018. The feedback are accepted at [https://github.com/ruby/snap.ruby](http://github.com/ruby/snap.ruby). Please enjoy.

ja/news/_posts/2018-11-08-snap.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout: news_post
3+
title: The official ruby snap is available
4+
author: Hiroshi SHIBATA
5+
translator:
6+
date: 2018-11-08 14:58:28 +0000
7+
lang: ja
8+
---
9+
10+
Ruby の公式 snap パッケージをリリースしました。
11+
12+
https://snapcraft.io/ruby
13+
14+
snap は canonical が開発している新しいパッケージシステムです。独自のファイルシステムを利用して、バイナリの動作に必要なライブラリを全てパッケージングして配布することができます。snap を利用することで、 yum や apt のような Linux ディストリビューションのパッケージシステムを利用した時に、任意のバージョンをユーザーが自由に使うことができない問題を解決しました。
15+
16+
Ubuntu 16.04 以降のディストリビューションなら以下のコマンドで snap ruby を使うことができます。
17+
18+
sudo snap install ruby --classic
19+
20+
Ubuntu 以外のディストリビューションで snap を利用する場合の準備については https://docs.snapcraft.io/installing-snapd/6735 を参照してください。
21+
22+
Ruby の snap パッケージは channel と呼ばれる機能を用いて、現在メンテナンスしているバージョンを配信しています。例えば、2018/11 現在 channel を指定しない場合は 2.5.3 がインストールされますが、2.4 を利用したい場合は以下のように指定します。
23+
24+
sudo snap install ruby --classic --channel=2.4/stable
25+
26+
snap の機能を使うと複数の Ruby のバージョンを利用することができます。例えば、Ruby 2.3 に切り替えるには以下のコマンドを実行します。
27+
28+
sudo snap switch ruby --channel=2.3/stable
29+
sudo snap refresh
30+
31+
また、snap の制限事項として、RubyGems は `$HOME/.gem` にインストールされるように GEM_HOME と GEM_PATH を設定しています。そのため、rails や rspec などのコマンドを `bundle exec` を用いずに実行したい場合は以下の行を `.bashrc` などに設定する必要があります。
32+
33+
eval `ruby.env`
34+
35+
`$HOME/.gem` は複数のバージョンで共有されるため、バージョンを切り替えて利用した場合、C 拡張などは `gem pristine` コマンドを用いて再コンパイルする必要があります。
36+
37+
この ruby snap は 11/6-8 にロンドンの canonical オフィスで開催された snapcraft summit で初めて公式バージョンをリリースしました。不具合やフィードバックは https://github.com/ruby/snap.ruby で受け付けています。お楽しみください。

0 commit comments

Comments
 (0)