ohmyzsh: compdef: unknown command or service: rails after changing "rails3" plugin to "rails"

After changing rails3 to rails in my zshrc, I got this error:

compdef: unknown command or service: rails

PS. I’m using rbenv.

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 27

Most upvoted comments

On my machine at work rm -f ~/.zcompdump*; compinit fixed the issue. On my machine at home and on a colleagues machine that didn’t help.

@drakmail Try something like chmod -R go-w ~/.oh-my-zsh to fix the permissions, verify it’s fine using compaudit and then rerun rm -f ~/.zcompdump*; compinit.

Fixed it by doing:

compaudit | xargs chmod g-w compaudit | xargs chown root rm -f ~/.zcompdump*; compinit

Any downsides to this method; am I okay permissions wise? Thanks!

fix for me (rbenv) rbenv rehash