Cannot find bundler

已回答

under mac, i have ruby and bundler installed

```bash
$ which ruby
/usr/local/bin/ruby
$ ruby --version
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
$ which bundle
/usr/local/bin/bundle
$ bundle --version
Bundler version 1.16.2
$ gem list rubygems

*** LOCAL GEMS ***

rubygems-update (2.7.7)
```

i am familiar with [ruby plugin documentation][1]; i configured ruby sdk

in the view above, i noticed that bundler is not listed (neither rspec, etc.)

and of course i have installed the ruby plugin

i do not know what the structure should look like, but i do see bundler in the external libraries of the project but not the gems i have installed with bundler under the project (i have a Gemfile and .bundle/config file within the project)

yet, i do not see bundler in "Tools | Bundler" as the documentation depicts, or any other ruby related menus (irb console, etc.)

when i edit the run\debug configurations, i get the error message "Run Configuration Error: Cannot find Bundler in ruby 2 SDK.

because of that, i am unable to neither debug, not run the project.

what am i missing?
how can i fix it?
how do i get intellij to show me the "Tools | Bundler" menu?

thank you!

 

update:

i created a new ruby project from scratch. although most of the configurations\settings above came builtin, and i can even see the gems tab in the project settings and the bundler menu

but i i still unable to run my program under bundler and have the same error on the run\debug configurations.


[1]: https://www.jetbrains.com/help/idea/ruby.html

1

anyone??

0

Hello,

could you please specify what IDEA and Ruby plugin versions are you using. In addition, would it be possible to attach idea.log (Help | Show log in), you can upload it to any file hosting site or send me to rubymine-support@jetbrains.com

0

intellij idea version 2018.1.4

ruby plugin version 2018.1.20180515

 

pulled the log from ~/Library/Logs/IntelliJIdea2018.1/idea.log, you can find it in https://pastebin.com/xtYHEyK9

0

olga, any update?

0

This is an issue with Latest and 2018.2 Beta rubymine. The problem is with Ruby 2.4.x bundler is now a "default gem":

```
gem list | grep bundler
bundler (default: 1.16.2, 1.6.1)
bundler-audit (0.5.0)
bundler-unload (1.0.2)
rubygems-bundler (1.4.4)

```

So it's shipped with ruby and installed in a slightly different place. Rubymine needs to update it's probes to look for bundler in a different place.

Regular unix commands reveal that despite internally it is in a different location, externally it still resides in the same place:

```

which bundler                                                       
/Users/brodock/.rvm/gems/ruby-2.4.4/bin/bundler

```

0

[SOLVED]

I'm in the same situation!

Ruby 2.2.2

IntelliJ IDEA 2018.2.5 (Ultimate Edition)
Build #IU-182.4892.20, built on October 16, 2018
Licensed to Hidehiro Nagaoka
Subscription is active until September 15, 2019
For educational use only.
JRE: 1.8.0_152-release-1248-b19 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.1

As for me, the reason is that the project is detected like JRuby project. So I re-created the project like Ruby on Rails and it worked perfectly!

1

@Brodock, @Qw3l3qjvj,

could you please check whether the problem with gems persists in RubyMine 2018.3 RC2? 

0

@Olga I don't see this issue in 2018.3 RC anymore

0

I have RubyMine 2018.3.1 and I have this issue. I also use RVM and my configured Ruby version for my project is 2.3.8. This comes with Bundler gem 1.16.6 [bundler (default: 1.16.6)].

Is this problem supposed to be resolved at the version I am using?

 

> gem list bundler

*** LOCAL GEMS ***

bundler (default: 1.16.6)
bundler-unload (1.0.2)
rubygems-bundler (1.4.5)

> which bundle

/Users/ilias/.rvm/rubies/ruby-2.3.8/bin/bundle
0

FYI:  I'm also using 2018.3.1 and I worked around the issue by running:

> gem install bundler

in my project directory.  Once you do that, IntelliJ can find it and it runs.  Rather annoying to have to do this, though.

1

That problem will be fixed in 2019.1: https://youtrack.jetbrains.com/issue/RUBY-19030 Sorry for the inconvenience.

1

请先登录再写评论。