1
0

More than 1 year has passed since last update.

Rails Sprockets::Rails::Helper::AssetNotFound の解決に色々頑張った話

Posted at

始めに

仕事終わりにRails触るぞと思ってrails sをしてlocalhostにアクセスしようとしたらタイトルの通りトラブったので備忘録です。記事を調べた時にどれもこれも本番環境の話をしていたのでここでdevelop環境でエラーが起きた時の解消法を記事にしました。

起きた現象

画面のスクショを取り損ねたのでコピペ文章を貼ります。

エラー
Rails Sprockets::Rails::Helper::AssetNotFound in Stations#index

The assets "application.css" is not found in the assets pipeline.

昨日は特に問題なく起動できたのになぜなんだ……application.cssなんて全く弄っていないが? ということで色々調べてみたのですが、どうもアセットパイプライン周りのエラーっぽいことがわかりました。ということで行った対処がこちら。

$ bundle exec rake assets:clean
$ bundle exec rake assets:precompile

これで無事再びlocalhostにアクセスしたら開けるようになりました。

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