LoginSignup
3
2

More than 5 years have passed since last update.

rake routes実行時のメモ

Posted at

rubyのrailsで新しいページをroutes.rbに一行追加(ルーティングに追加)したので、
rake routesで確認しようとしたら、
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

というエラーメッセージが出たので検索した。

以下のページを見たら解決した。
https://ameblo.jp/micha7-micha1/theme-10057658645.html
(rake routesは、プロジェクトのある階層に移動して実行しないとエラーになると書いてある。)

解決のポイント
cdを使って、カレントディレクトリを移動してから、rake routesをする。

感想
エラーメッセージの内容からすると、No Rakefile found(=Rakefileが見つからないよ)と言っているので、同じカレントディレクトリにrakefileがないといけないようだ。

rakefileについては、以下のページを参考に読んだ。
https://qiita.com/you8/items/ce893fa27b19fd6da031
https://qiita.com/tbpgr/items/5c2f192da0ccf8fad5e1

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