I am new in Ruby on Rails, and as I came from Java world and was working in IntelliJ Idea, I stared to use RubyMine for RoR development.
I have generated new project and opened it in RubyMine. Everything compiles and works fine but RubyMine highlights some lines as errors (but actually there are no errors).
For example code from application_controller.rb
protect_from_forgery with: :exception
semicolon after 'with' is highlighted as error and hind says 'Expected: ; or end of line'
Similar error highlights are in a lot of places in project
I guess may be there are some problems with different Ruby and Rails versions? Or RubyMine don't have support for some kind of new syntax?
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
Rails 4.0.1
RubyMine 5 couldn't do with:
, and RubyMine 6 can.
A major tip: If you come from Java-land, you will find that static analysis of dynamic languages is hit-or-miss. (It needn't be, per http://www.oreillynet.com/onlamp/blog/2008/05/dynamic_languages_vs_editors.html , but it is!) You will learn how to disregard some of the details that RubyMine complains about.
For example, you should prefer 'single quotes'
without a compelling technical need for "double quotes"
. But tests should use literate strings with double quotes, such as scenario "I do not like RubyMine lint" do
. That's just an edit away from scenario "I don't like RubyMine's lint" do
, so all such literate strings should start with double quotes. But RubyMine dutifully flags them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With