问题描述
我的 rails 项目运行良好.但是 rubymine 突出显示错误 expected ;或在一些
.例如colon :
之后的行尾
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.' }
在上面的 rubymine 中,在 only:
和 notice:
之后突出显示错误.但它不会在 :set_answer、:show、:edit、:update 或 :destroy
之后突出显示错误.
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?
推荐答案
在 Mac 上使用更高版本的 RubyMine:转到首选项 -> 'Language &Frameworks' -> 'Ruby SDK and Gems',然后更改为 Ruby 2.0 SDK 重新启动,它应该可以工作了.
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.
这篇关于RubyMine:预期;或一些冒号后的行尾错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!