LoginSignup
3
2

More than 1 year has passed since last update.

CondaでRubyを使う

Last updated at Posted at 2023-04-19

AnacondaやMinicondaでRubyをインストールして使いたい場合があるかもしれない。普通に、

conda install ruby

とすればRubyは使えるようになるけれども、これだとネイティブ拡張を利用したgemをコンパイルしてくれない。ネイティブ拡張を全く使わずにRubyを使うケースはほぼないと思うので、この方法だと実用性があまりない。

では、どうすればいいかというと、conda-forgeからRubyをインストールすればいい。そして、compilerというパッケージも同時にインストールしておく。

conda install -c conda-forge ruby
conda install -c conda-forge compilers

これで、簡単にAnacondaやMinicondaなどのConda環境から、Rubyを使えるようになる。

この記事は以上です。

参考文献
https://github.com/conda-forge/ruby-feedstock/issues/44

3
2
0

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
3
2