0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Railsのannotateでハマった話

Last updated at Posted at 2020-02-17

ハマったところ

Railsでannotateのgemを入れて

group :development do
  gem 'web-console',           '3.5.1'
  gem 'listen',                '3.1.5'
  gem 'spring',                '2.0.2'
  gem 'spring-watcher-listen', '2.0.1'
  gem 'pry-byebug'
  gem 'annotate'
end

インストールしたのに

bundle install

annotateコマンドが反映されない,なぜか

$ bundle exec annotate
// なにも結果が帰ってこない

こうやって解決

Railsのプロジェクトに明示的に導入しないと使えないみたい.

$ rails g annotate
// これでannotateできるようになった

gemがinstallされていることと,今作業しているプロジェクトで使えることは別モノだということに気づけた.

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?