This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
6 Replies Last post: Jan 9, 2015 12:20 PM by Oleg Sukhodolsky  
Christoph Rieß Newbie 1 posts since
May 4, 2013
Currently Being Moderated

May 4, 2013 9:04 PM

Bundled Gems not showing up under Project -> External Libraries

Hello Forum'ers,

 

I am currently wondering whether it is a feature or a bug that bundled gems won't show up under "Project -> External Libraries".

 

My setup is userspace RVM (in ~/.rvm/) under Linux x64 with RubyMine 5.4.1 (Eval Version).

 

Here is what Tools -> Show Gem Environment says:


RUBYGEMS VERSION: 1.8.23

RUBY VERSION: 1.9.3 (2012-11-10 patchlevel 327) [x86_64-linux]

INSTALLATION DIRECTORY: /home/criess/.rvm/gems/ruby-1.9.3-p327

RUBY EXECUTABLE: /home/criess/.rvm/rubies/ruby-1.9.3-p327/bin/ruby

EXECUTABLE DIRECTORY: /home/criess/.rvm/gems/ruby-1.9.3-p327/bin

RUBYGEMS PLATFORMS:

  ruby

  x86_64-linux

GEM PATHS:

   /home/criess/.rvm/gems/ruby-1.9.3-p327

   /home/criess/.rvm/gems/ruby-1.9.3-p327@global

GEM CONFIGURATION:

   :update_sources => true

   :verbose => true

   :benchmark => false

   :backtrace => false

   :bulk_threshold => 1000

REMOTE SOURCES:

   http://rubygems.org/

----------------------

IDE: JetBrains RubyMine 5.4.1, build #RM-129.303

OS: Linux 2.6.32-358.6.1.el6.x86_64[amd64]

Java: 1.6.0_30-b12

RubyMine SDK Environment:

Sdk: RVM: ruby-1.9.3-p327

Sdk Version: ver.1.9.3p327 ( revision 37606) p327

Ruby Interpreter: /home/criess/.rvm/rubies/ruby-1.9.3-p327/bin/ruby

RVM Sdk: yes, gemset:[default]

RVM Home: /home/criess/.rvm

Sdk Language Level: 1.9

Sdk Load Path:

     ~/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1

     ~/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/x86_64-linux

     ~/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby

     ~/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/vendor_ruby/1.9.1

     ~/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/vendor_ruby/1.9.1/x86_64-linux

     ~/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/vendor_ruby

     ~/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1

     ~/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/x86_64-linux

     /opt/rubymine/rubystubs193

Sdk Gem paths:

     ~/.rvm/gems/ruby-1.9.3-p327/bundler/gems

     ~/.rvm/gems/ruby-1.9.3-p327/gems

     ~/.rvm/gems/ruby-1.9.3-p327@global/gems

Gems used for 'onlineantrag-rails':

     journey (bundled(1.0.4))

         ~/workspace/onlineantrag-rails/vendor/bundle/ruby/1.9.1/gems/journey-1.0.4

     simplecov-html (bundled(0.7.1))

         ~/workspace/onlineantrag-rails/vendor/bundle/ruby/1.9.1/gems/simplecov-html-0.7.1

     net-sftp (bundled(2.0.5))

         ~/workspace/onlineantrag-rails/vendor/bundle/ruby/1.9.1/gems/net-sftp-2.0.5

     rmagick (bundled(2.13.1))

         ~/workspace/onlineantrag-rails/vendor/bundle/ruby/1.9.1/gems/rmagick-2.13.1

     activemodel (bundled(3.2.13))

         ~/workspace/onlineantrag-rails/vendor/bundle/ruby/1.9.1/gems/activemodel-3.2.13

     ... <A lot more of these gems here>

 

I installed the bundle with the --path option on bundler and RubyMine IDE isn't even complaining about missing gems. If installing the bundle without --path option (which means standard gem path is used) the gems do show up in "Project -> External Libraries".

 

So to come back to topic, is there a rubymine way to have bundled gems (in custom path) show up inside the afore-mentioned panel?

 

PS: here is my <projectfolder>/.bundle/config file:

 

---

BUNDLE_BIN: bin

BUNDLE_PATH: vendor/bundle

BUNDLE_DISABLE_SHARED_GEMS: '1'

 

Regards, Christoph

Jeff Whitmire Newbie 25 posts since
Aug 21, 2002
Currently Being Moderated
May 24, 2013 10:17 AM in response to: Christoph Rieß
Re: Bundled Gems not showing up under Project -> External Libraries

I see the same thing.  I just switched from rvm to rbenv and I'm just using bundler (not gemsets) with a local config path.  I can set the SDK to my rbenv and see all of the gems I have installed globally, but not the ones in my bundle.  This worked fine for bundler, but I had issues getting rubymine to recognize them as installed and expose them as external libraries.  I could search them by searching the bundle directory but I would prefer to have them as external libraries.  If there is anything specific I can do to help diagnose this problem or test a fix, let me know.

Michael M Newbie 2 posts since
Nov 1, 2013
Currently Being Moderated
Nov 1, 2013 1:54 AM in response to: Christoph Rieß
Re: Bundled Gems not showing up under Project -> External Libraries

Did anyone figure this out... Looking for a while and I can't find anything.


Juan Bonfante Newbie 2 posts since
Dec 30, 2014
Currently Being Moderated
Dec 30, 2014 11:45 PM in response to: Michael M
Re: Bundled Gems not showing up under Project -> External Libraries

I still don't think this has been completely solved. Outside of adding that specific gems folder to you GEM_HOME path when starting RubyMine/intelliJ.

 

I don't like this solution, as I work with multiple projects at once and having to run them all as different instances of RM (which I'm not even sure it's possible), really does suck.

Oleg Sukhodolsky JetBrains 1,026 posts since
Apr 4, 2012
Currently Being Moderated
Jan 3, 2015 9:47 AM in response to: Juan Bonfante
Re: Bundled Gems not showing up under Project -> External Libraries

It is supposed to be fixed in the resent versions of RubyMine and Ruby plugin.  Could you please describe what version are you using and where the gems are located.

 

Regards, Oleg.

Juan Bonfante Newbie 2 posts since
Dec 30, 2014
Currently Being Moderated
Jan 7, 2015 12:24 AM in response to: Oleg Sukhodolsky
Re: Bundled Gems not showing up under Project -> External Libraries

Hi Oleg,

 

The problem only appears to be happening when using a custom git repo inside of our gemfiles, for example:

 

#Top of Gemfile
git_source(:custom_git) { |repo| "https://git.enova.com/#{repo}.git" }

#further in gemfile
gem 'some_gem',    custom_git: 'project/some_gem', require: 'somegem'

For some reason Bundler, installs these gems under this directory structure:

 

~/.rvm/gems/ruby-{version}@gemset/bundler/gem

I'm uncertain wether this is a bundler issue, or if rubymine doesn't look inside bundler/gems.

 

Either way the solution for me was to add these custom gem paths to the ~/.rvm/evnironment/{ruby-gemset} file, then into the SDK loadpath, and now it works.

Oleg Sukhodolsky JetBrains 1,026 posts since
Apr 4, 2012
Currently Being Moderated
Jan 9, 2015 12:20 PM in response to: Juan Bonfante
Re: Bundled Gems not showing up under Project -> External Libraries

I think this is a RubyMine's problem (Bundler is supposed to keep such gems in that location).

Mostlikely we are unable to understand custom tag you are using.

Could you please try to use stndard params for gem to check if RubyMine will be able to find them this way.

 

Thanks in advance, Oleg.

More Like This

  • Retrieving data ...