RubyMine:预期; 或冒号后的行尾错误
我的rails项目运行得很好。 但是,rubymine突出了错误expected ; or end of line
expected ; or end of line
后的expected ; or end of line
colon :
。 例如
before_action :set_answer, only: [:show, :edit, :update, :destroy] format.html { redirect_to @answer, notice: 'Answer was successfully created.' }
仅在以上情况下,rubymine突出显示错误only:
并notice:
。 但它没有突出显示以下错误:set_answer, :show, :edit, :update or :destroy
。
这是什么原因,我该如何解决这个问题?
随后在Mac上使用RubyMine版本:转到首选项 – >’语言和框架’ – >’Ruby SDK和Gems’,然后更改为Ruby 2.0 SDK Restart,它应该可以工作。