vendor/bundle and rubymine?
Hi I just swithced from RVM to rbenv. I use bundler to manage my gems, however, seems rubymine 5 EAP dose not recognize it.
Meaning if I only do bundle install, which installs all the gems under vendor/bundle, then rubymine will not show them under 'Ruby SDK and Gems' settings. Only if I do bundle install --system, they will show up. Othewise some features will not be working. Say, with vendor/bundle, I can not run spec, cucumber inside rubymine, although I can do that in console.
I wonder if something I did wrong. Or Rubymine purely just does not work with vendor/bundle folder?
Any suggestions?
Thanks
Please sign in to leave a comment.
Hi,
if you configured bundler to install gems in vendor/bundle by-default then RM is supposed to handle this (and if it is not then this is a bug).
But if you manually point bundler the directory to use every time then RM has no way to detect this.
Regards, Oleg.
Hi Oleg,
Thanks replying,
My .bundle/config only has one line there:
BUNDLE_DISABLE_SHARED_GEM: '1'
I toggled the following config, and seems it does not take effect.
I assume that what you mean by default is just bundle install( instead bundle install --path vendor/bundle). It does not work too.
The only way I can get it working is to do a bundle install --system.
So I tend to think this might be a bug for rubymine.
Thanks
Lei
Here is a bit more about my settings. I think I globally set my bundler to install the project specific gemset by default to vendor/bundle.
That's why my global shared gem set is pretty much empty(except bundler, debugger, rake...a few gems there).
I also see on RVM setting, there is a checkbox to ignore globle gem path. I think this setting should be available for rbenv too. Which is ignore the global gem path, and only use the specified gem path, which is vendor/bundle in most of the cases.
Dont know if this is correct.
Hi,
we are supposed to handle BUNDLE_PATH in user's config.
Could you please describe how you have configure bundler to install gems in vendor/bundle by-default (which env.variables you have set, which config file you have changed and what have you added to them)
Regards, Oleg
Run "bundle config --global path='vendor/bundle'" in teminal, then bundler will create a default .bundle folder under the home. Inside there will be created a config file containing
BUNDLE_PATH: vendor/bundle
This will by default install all the gems to vendor/bundle folder to each different projects, and I believe this can be override by each project's local .bundle/config too.
If rubymine can handle BUNDLE_PATH as environment variable or local setting, then pretty easy to handle this config file as well, just do one more step checking if the local one is missing.
BTW: I hope you guys can add one more feature as Eclipse in about menu, showing out all the environment variables currently Rubymine inherited(or maybe this feature is already there?).
Thanks
Lei
Hi,
I think I've identified the problem in our code and filed ticket about it (http://youtrack.jetbrains.com/issue/RUBY-12913).
In a mean time you can workaround it by using local bundler's config (which is located in project's directory)
As for your other suggestion I think this is a good idea - feel free to file feature request in our tracker (http://youtrack.jetbrains.com/issues/RUBY)
Regards, Oleg.
Thanks for the greatness of the work.
Hi Oleg, should a local .bundle/config also work for IntelliJ with the Ruby plugin installed?
Well, it is supposed to :) if it doesn't then this is a bug.
Oleg.
hi Lei and Oleg
I've been experiencing the same problem with the following releases of RubyMine:
RubyMine 2016.3 Build #RM-163.7743.60, built on November 28, 2016
RubyMine 2016.3.2 EAP Build #RM-163.10154.48, built on December 23, 2016
RubyMine 2017.1 EAP Build #RM-171.2014.20, built on December 29, 2016
I solved it by removing the PATH line from my global .bundle/config.