0
0

More than 1 year has passed since last update.

ファイルかディレクトリがない@ rb_sysopenと言われた

Posted at

rails sを行うと
Error: No such file or directory @ rb_sysopen
でサーバーを起動できませんでした。

→6系だとYarn、webpackerがインストールされていないと表示されるらしい

参考にしたもの:
https://prograshi.com/framework/rails/how-to-install-rails6-on-local-env/

Rails6.0以降の場合
version6をインストールした場合、下記2つがインストールされている必要がある。

Yarn:パッケージマネージャー(npmの上位互換)
webpacker:gemパッケージの一つ
 - 画像やcss, jsなどのリソースをモジュール化できる
 - rails5.1から標準サポート
 - rails6.0以降必須になった

と記載がありました。
そこで
1
#yarnのインストール(node.jsインストール済み)
npm install -g yarn
2
#webpackerのインストール
$ rails webpacker:install
を行いました。
3
rails s

6系を使っている人はyarn、webpacker、rails sの順に

実行結果
無事サーバーが起動されました。

0
0
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
0
0