Technically Impossible

Lets look at the weak link in your statement. Anything "Technically Impossible" basically means we haven't figured out how yet.

VSCodeで最低限のRuby環境構築、2021年版-設定編

RubyVSCode拡張の更新に伴い、その設定方法も更新されていることに気付いた。その要点は、

  • Language serverを使え。
    • まだ開発中ではあるものの使用推奨。
  • これまでの設定はLegacy Configuration。
    • 今後の更改見込みはなく、Ver 1.0到達時点で排除。

It is highly recommended that you enable the Ruby language server (via the Use Language Server setting or ruby.useLanguageServer config option). The server does not default to enabled while it is under development but it provides a significantly better experience than the legacy extension functionality. See docs/language-server.md for more information on the language server.

Legacy functionality will most likely not receive additional improvements and will be fully removed when the extension hits v1.0

Ruby - Visual Studio Marketplace

2018年に投稿した「VSCodeで最低限のRuby環境構築*1」での設定が、まさにLegacy Configurationだ。Rails環境を整える前に、その内容を2021年版的なものへ更新しようと思い立った。

続きを読む

Rails on WSL2 + Ubuntu 20.04 LTS - Error-free installation process with minimum packages

Abstract

This article introduces the installation process of Ruby on Rails. Basic process is

  1. Install packages
  2. Install Gems
  3. New Rails project and run server for operation check

The characteristic part is Yarn installation. It is installed with "npm", not "apt". This reason is also explained in the guidance.

  • Abstract
  • Prerequisite
  • Packages
    • Dependencies
  • Installation process
    • Package installation
      • Yarn installation
      • Gem installation
  • Operation check
  • Not recommended: The official Rails image on Docker Hub
  • Reference
  • Gem
    • gem environment
    • gem list
続きを読む

Ubuntu 20.04 LTS+WSL2でRailsを起動するまで-Yarnはnpmから導入する


DockerコンテナからWSLへLinuxファイル・システムをインポートできることを知ってからというもの、やってみたいことのアイデアが色々と浮かんできた。そのうちの一つが、Docker Hubで提供されているRailsイメージをWSLへ移行すれば、お手軽にRails環境を構築できるのではないか、という考えだった。

結論から言うと、この手は使えない。理由は後述するとして、結局のところ、WSL上で一から環境構築するのが手っ取り早かった。
この投稿では、Ubuntu 20.04LTS + WSL2上にRails環境を構築する手順を紹介する。

なお、この投稿で使用しているUbuntuの初期状態は、次の投稿の「aptミラー・サイトの設定、aptパッケージの更新」に記載している作業まで完了していることを前提としている。
impsbl.hatenablog.jp

  • 前提、要件
    • ヴァージョン
  • パッケージ
    • Rails関連
    • 依存関係
  • 導入手順
    • パッケージの導入
      • Yarnの導入
      • Gemの導入
  • 動作確認
  • Railsの教科書』の導入
  • 余談-Docker Hubの公式Railsイメージ
  • 参照
  • Gem環境
    • gem environment
    • gem list
続きを読む