Posts Tagged ‘rails’

What’s mining: Model Dependency Diagram revisited

Friday, October 9th, 2009

We’ve always considered RubyMine’s Model Dependency Diagram a killer feature.

To make it even more killing we’ve made some small but nice changes just recently.

1. System default DB fields (id, created_at, updated_at) are now hidden by default and can be shown if needed



2. Relations are now more informative as they consider the inheritance of models

3. Some performance improvements were also made making the diagram load faster.

The new functionality will be available in the nearest RubyMine Beta update. Stay tuned for news on this blog!

What’s mining: search for duplicates in Ruby

Wednesday, September 16th, 2009

Hi all,

It is always a pleasure to tell about new features! This time I’m glad to announce a brand new one that is coming in next RubyMine 1.5 EAP — “Locate duplicates”. It is another useful tool in RubyMine’s code analysis arsenal. Everyone has once faced with copy-paste problem: when you don’t use a refactoring such as extract method/module/variable for some reason but just do copy&paste. Your code begins to “smell”.

Locate duplicates is a helpful feature designed to assist you in writing safe, fast and error-free code.

Use Code | Locate Duplicates menu item to start it. You’ll see the  Code Duplication Analysis Settings dialog where you can tune the intelligibility of the search.

Local variables, Fields, Methods, Literals can be anonymized. Do not show duplicates simpler than and Anonymize uncommon subexpressions simpler than options operate with some heuristic values complexity of found fragments of code. These thresholds are used to cut off obvious duplicates like local variables, field etc. You can change them later, but the defaults should fit pretty good for a start.

Results of this search are shown in a familiar diff view with code fragments to inspect the results.

You are welcome to try this in coming EAP build.

-JetBrains RubyMine Team

What’s mining: Rails i18n support

Wednesday, August 26th, 2009

Hello folks,

Today we are going to tell you about forthcoming Rails i18n support in RubyMine. This functionality is planned for RubyMine 1.5 release in our roadmap, and you will be able to try it in next EAP builds. Feature is under development so comments, suggestions and even feature requests are very welcome :)

At the moment RubyMine supports the following:

  • Resolve and completion for property keys with quick navigation info. Autocompletion for property keys:
  • Go to declaration action:
  • Convenient usages search for property keys
  • Rename property key in locale files with all usages
  • Rails conventions for templates key prefixes
  • Inspection with quickfix for undefined property key. RubyMine offers to apply “Create property” quickfix.

Not all the desired functionality is implemented yet, but we are working hard on it. Just want to mention some of the further feautures:

  • Duplicate property key Inspection
  • Intention to i18nize plain text value
  • Check whether all the keys present in given locale file
  • your suggestions?

Please do not hesistate and let us know your opinion about all this at our forum at: http://www.jetbrains.net/devnet/community/ruby

-JetBrains RubyMine Team

RubyMine 1.1 RC

Friday, May 22nd, 2009

RubyMine 1.1 is ready but we do not like releasing on Fridays. So, to let you try all the new stuff earlier than later, we release the Release Candidate now!

What is in RubyMine 1.1:

  • Rails 2.3 support
    • Application templates support on project creation
    • Localized views support
    • Improved code insight and rails-specific completion
  • HAML syntax highlighting
  • Cucumber BDD framework support (thanks to Aslak Hellesoy for helping from Cucumber side!)
    Note: you need the latest Cucumber 0.3.7 gem

  • Remote Debug for Ruby and Rails
  • DRb server support for RSpec.
  • And other IDE improvements such as
    • Create New Ruby Class option
    • Load selected code to IRB console (Alt+Shift+L / ⌥⇧L)
    • Platform specific IDE Help, with corresponding default shortcuts

Download RubyMine 1.1 for Windows, Mac OS X or Linux, get evaluation key, if you do not have one yet, and try it!

If you have questions about some features, ask on the forum and we’ll be glad to help.

-JetBrains RubyMine Team

RubyMine 1.0.5—first step further

Thursday, May 14th, 2009

It’s only 2 weeks since RubyMine 1.0 was released one of which we spent at RailsConf, but here is the first update to RubyMine and it is not just to patch some holes—there are also new features in this version.

See the complete Release Notes in our wiki, and here is an extract of what’s new:

  • Initial support for Rails 2.3
  • Initial Cucumber testing framework support: syntax highlighting for .feature files. 
  • RSpec Drb support
  • Experimental support for Ruby remote debug
  • Some improvements to the editor such as column mode selection with mouse+Alt/Option key (requested by TextMate users)
  • More code autocompletion
  • and of course some bugfixes

The next update, RubyMine 1.1, is planned before the end of May. Stay tuned!

-JetBrains RubyMine Team

What’s mining: Rails console

Thursday, March 26th, 2009

Just yesterday a new feature became available in RubyMine: the Rails console.

Now you can use the console for whatever you got used to.

Open it with Run | Run Rails console…, select the environment you want to use

and do what you need:

The console provides syntax highlighting, commands history using Up/Down arrow buttons,
And you can configure the console colors in Settings | Editor | Colors & Fonts | Ruby Console.

The feature will be available in the nearest public build of RubyMine.

RubyMine EAP build 784

Friday, March 20th, 2009

New Early Access build of RubyMine is available. Chances are this is the last build before the Beta release. Here is the list of changes:

  • Improved “Analyze Stacktrace”. You can now match stacktrace from production server or other team member with your local project sources
  • Improved documentation rendering in quick documentation lookup
  • Smart Rails controllers renaming: helper, views, spec and test:unit tests are also renamed
  • Quick Rake Task popup
  • Single key selection surround with quotes, parentheses, etc.
  • Gem descriptions markup rendering added
  • Misc improvements to gem manager stability
  • RSpec 1.2.0 compatibility
  • And a number of other fixes and improvements. See complete release notes.

Download RubyMine EAP build 784 and let us know your thoughts.

The Ruby plugin for IntelliJ IDEA has also been updated for all users of IntelliJ IDEA.

Also, you can now follow RubyMine on Twitter.

This is how documentation looks now when you press Ctrl+Q / ^J

Dogfooding Analyzed

Wednesday, March 18th, 2009

As you may remember we dedicated one week to use RubyMine as you would use it and work on Exception Browser application. In addition to the “dogfooding” we wanted to improve the process of tracking issues reported from RubyMine and IntelliJ IDEA. Well, I guess now is a good time to share some of our experience of working with RubyMine.

So let’s start. We took our laptops and occupied one of JetBrains conference rooms (see the photo) to concentrate on Rails development instead of our daily Java work.

Most of our team, including me, is not too experienced in writing real-life Ruby and Rails applications (book examples is obviously not quite enough). So the first days I personally was getting into Rails development. At that time I really appreciated the navigation features of RubyMine. ‘Rails aware navigate’ as well as ‘partial declarations’ and ‘overriding elements’ navigation helped a lot.

We had to work with an already defined database of the existing application. And its table names did not follow the Rails naming conventions, so some of the nodes in Rails Project View were not enabled. We had fixed it by renaming models according to Rails conventions and everything went OK. This allowed us to write migrations in Rails 2.2 style.

Of course we`ve faced other problems during the development week. Most of them were kind of usability issues: some bugs on editing code, parentheses typing inside a comment or a string, some exceptions, etc. Totally, we’ve added over 50 issues to our JIRA and some of them were even IDEA core issues.
Apart from the bugs we had also noticed some lack of functionality. I was really missing the ‘find usages’ for partial views, named routes support and support of set_table_name inside Models. Anyway, what really rocks is our support of Rails calls (paramdefs notation) like hide_action in controllers of has_*, belongs_to, etc. in Models. It smartly completes the parameters available for a given call with resolve and automatic inspections.

Many of the usability problems we had found then are already fixed and available in the latest RubyMine EAP and Ruby plugin for IntelliJ IDEA. We’ve also significantly improved the performance of background code analysis tasks by completely rewriting some parts of the code.

At the moment we put lots of our effort to improving the overall usability of RubyMine (new rake run action, enhancing Ruby Quick documentation layout, etc).

I think it was a great experience and I’m sure we will do it again!

As for the Exception Browser, there are still some things to finish: improve the layout, add some minor features. Once it is ready, we will deploy it to let you track you exception reports and help us make RubyMine even better!

But now we have the Beta release to concentrate on.

To finish, the project code navigation features that I really love in RubyMine:

Navigate to Rails

Go to overridden class

Go to partial view from Controller

Posted by Oleg Shpynov, Software Developer

RubyMine EAP build 715

Tuesday, February 17th, 2009

You can download the latest RubyMine build featuring the following:

  • Rename Refactoring for Rails View templates and Rails Action Methods (short demo)
  • Remote gems browsing and installation using the Gem manager
  • Improved ‘Find Usages’ performance
  • Show partial declaration
  • other improvements and fixes

Download RubyMine EAP build 715 and share your feedback.

We have also updated the Ruby plugin for IntelliJ IDEA. All the features recently added to RubyMine are now available in IntelliJ IDEA too.

What’s mining: Install gems from RubyMine

Thursday, February 12th, 2009

We’ve added a basic Ruby gem manager functionality in the latest EAP build.

It allows you to browse local gems inside a selected Ruby SDK and choose the ones you need in the project including the dependent ones. For Rails projects, the latest found version of Rails is auto-added.

That’s almost all that we have now. But this is far from all we plan.

So, here is what’s coming soon:

  1. Browse remote gem repositories and install gems. rubyforge.org is the default, of course.
  2. Want a new Rails project but Ruby on Rails is not there? Hardly possible, but in case it happens, the needed gems will be downloaded and installed on the project creation.
  3. Want to debug your app, but debugger gems not installed? RubyMine will handle it automatically.

For dessert, here is the list of gems from http://gems.rubyonrails.org

Already tried the Rails 2.3.0 RC1, by the way?

Which of the new features you think RubyMine should have first? Let us know!

Posted by Eugene Toporov, Marketing Manager