0
0

More than 3 years have passed since last update.

Windows10 でRubyOnRails 4でindex.html.erb作成中の問題、解決方法

Posted at

Windows10 でRubyOnRails 4でindex.html.erb作成中の問題、解決方法

bin/rails ...コマンドでviews内にindex.html.erbファイルを作成する際に、
「このファイルを開く方法を選んでください」というウィンドウが開かれ、index.html.erbファイルが作成されない時の解決方法を共有します。

環境

  • システムの種類:Windows10 Home 64ビットオペレーティングシステム、x64ベースプロセッサ
  • Rails version 4系

現象

1.bin/rails generate controller welcome index コマンドを実施する。

2.「このファイルを開く方法を選んでください」というウィンドウが開かれる。
スクリーンショット 2020-10-30 130959.png

解決方法

1.bin/rails ... の代わりに、rails ... コマンドを実施する。
例:rails generate controller welcome index
*ちなみに rails server コマンドでlocalhost:3000 も起動される。

ーーー

index.html.erbファイルが作成されていることが確認できる。
スクリーンショット 2020-10-30 140026.png

OK

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