RubyMine: expected ; or end of line error after some colon

徘徊边缘 提交于 2019-12-01 07:22:55

问题


My rails project works just fine. But rubymine highlights error expected ; or end of line after some colon :. For example

before_action :set_answer, only: [:show, :edit, :update, :destroy]
format.html { redirect_to @answer, notice: 'Answer was successfully created.' }

In above rubymine highlights error after only: and notice:. But it doesn't highlight error after :set_answer, :show, :edit, :update or :destroy.

What is the reason for this and How can I fix this?


回答1:


With later RubyMine versions on Mac: Go to Preferences -> 'Language & Frameworks' -> 'Ruby SDK and Gems', and change to Ruby 2.0 SDK Restart and it should work.



来源:https://stackoverflow.com/questions/30765073/rubymine-expected-or-end-of-line-error-after-some-colon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!