Idea of "Attaching a gem" in a Rails 3 project?

My understanding is that Rails 3 project uses Gemfile as the mechanism to bundle the application and all its dependencies.

Are there cases where one might need the gems other than those listed in Gemfile, for his/her Rails 3 project?

I find this "Attach gems" step in RM 3/3.1 rather redundant. I mean, wouldn't it suffice if RM allowed to edit Gemfile, responded to changes made to it and allowed installing the gems (by adding it to Gemfile)?
In other words, should I just concentrate on Gemfile and Gemfile alone in order to determine all of my app's dependencies (in a given gemset under rvm)?

-Kedar

3 comments
Comment actions Permalink

Hi Kedar,

I find this "Attach gems" step in RM 3/3.1 rather redundant.

Yes, our implementation in RubyMine appeared about 2 years ago when bundle gem didn't exist. "attached" gems table was designed to help people and our code insight engine to manage gem dependencies in ruby projects. At the moment "bundler" gem is de-facto and we are going to drop our "attach gems" concept. Most likely we will replace it with Gemfile config file in RubyMine 4.0. At the moment a lot of code insight features depends on attached gems setting and we cannot drop it easily in minor IDE update.

I mean, wouldn't it suffice if RM allowed to edit Gemfile, responded to changes made to it and allowed installing the gems (by adding it to Gemfile)?
In other words, should I just concentrate on Gemfile and Gemfile alone in order to determine all of my app's dependencies (in a given gemset under rvm)?

RubyMine 3.x automatically updates "attached" gems list according to Gemfile content. In most cases you don't need attach gems manually.

0
Comment actions Permalink

Roman,

Thanks for the update.
I understand it better now.
There is a cross-post about this topic in other thread.

-Kedar

0
Comment actions Permalink
RubyMine 3.x automatically updates "attached" gems list according to Gemfile content. In most cases you don't need attach gems manually.


That is what it *should* do, but what if you cannot attach the gems in the Gemfile even manually?

Asked here: http://devnet.jetbrains.net/thread/302932

0

Please sign in to leave a comment.