LoginSignup
2
1

More than 1 year has passed since last update.

Scoop で Ruby をインストール後ちょっとハマった話

Posted at

はじめに

WindowsRubyのインストールと言えばRubyInstallerですが、CrystalをインストールするにはScoopが必要なので、本格的に移行してみました。

bundle でハマった

Gemfileでパッケージ管理が楽々が魅力のRuby、しかしnative extensionsのインストールでエラーが発生。

Fetching gem metadata from https://rubygems.org/.....
Resolving dependencies...
Fetching debase 0.2.5.beta2
Installing debase 0.2.5.beta2 with native extensions
...
An error occurred while installing debase (0.2.5.beta2), and Bundler cannot
continue.

ああ、MSYS2 and MINGW development toolchain入れてないや。

ridk install でハマった

いつもお世話になっております ridk、いつものごとく ridk installっと。

ちょっと待って!、Cドライブ直下C:\msys64にインストールしようとしている。

Scoopのメリットは、ユーザディレクトリ直下のscoopフォルダにパッケージを入れることで環境を汚さない(汚れるのか?)ことだよ。

   1 - MSYS2 base installation
   2 - MSYS2 system update (optional)
   3 - MSYS2 and MINGW development toolchain

Which components shall be installed? If unsure press ENTER [1,3]

> sh -lc true
MSYS2 seems to be properly installed
Install MSYS2 and MINGW development toolchain ...
> pacman -S --needed --noconfirm autoconf autogen automake-wrapper diffutils file gawk grep libtool m4 make patch sed texinfo texinfo-tex wget mingw-w64-x86_64-binutils mingw-w64-x86_64-crt-git mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-headers-git mingw-w64-x86_64-libmangle-git mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-make mingw-w64-x86_64-tools-git mingw-w64-x86_64-winpthreads-git pkgconf mingw-w64-x86_64-pkgconf

ここでは、pacman以降のコマンドをコピーしておき、ridkは中止。

MinGW64 でハマった

user@XXX MINGW64 ~
$ pacman -S --needed --noconfirm autoconf autogen automake-wrapper diffutils file gawk grep libtool m4 make patch sed texinfo texinfo-tex wget mingw-w64-x86_64-binutils mingw-w64-x86_64-crt-git mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-headers-git mingw-w64-x86_64-libmangle-git mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-make mingw-w64-x86_64-tools-git mingw-w64-x86_64-winpthreads-git pkgconf mingw-w64-x86_64-pkgconf
warning: database file for 'clangarm64' does not exist (use '-Sy' to download)
warning: file-5.43-1 is up to date -- skipping
warning: grep-1~3.0-6 is up to date -- skipping
warning: sed-4.9-1 is up to date -- skipping
warning: wget-1.21.3-2 is up to date -- skipping
error: failed to prepare transaction (could not find database)

ScoopでインストールしたMinGW64にコピペしたらエラー、'-Sy'使えと言われる。

'-S'の換わりに'-Sy'を使用して無事インストール終了
最初のbundleも無事インストール終了

まとめ

  • scoop による ruby の環境構築に成功した
  • 折れない心が重要だ
2
1
2

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