Rubymine: Expected ; or End of Line Error After Some Colon

Double colon in class name and RubyMine complaints about short name

RubyMine uses reek for code smell detection.

Warning it's giving you is called Uncommunicative Module Name.

Uncommunicative Module Name checks for:

  1. 1-character names
  2. any name ending with a number

In your case warning was caused with 2 in V2. Even for Version2 it would be the same.

But it's actually only a recommendation. Ruby works fine with this code.

RubyMine automatically add end after typing do. How do enable this?

This did it for me:

Settings | Editor | General | Smart Keys

... then check "End on blank line"

Expected: } when defining hash using {key: value} notation

{ agent: request.user_agent } is a new syntax for hashes. You need Ruby 1.9 or newer to use that syntax.

It seems like you are still using Ruby 1.8, If so then write { :agent => request.user_agent } instead.

Or your version of IntelliJ does not understand this new syntax. Then you might want to investigate if there is a newer version of IntelliJ available.

Error: Statement expected, found py: Dedent

Problem solved by ignoring the error. Copied to an other editor and nothing here. So seems to be a PyCharm mistake.



Related Topics



Leave a reply



Submit