Cannot run program bundle (in dir): error = 2, No such file or directory

Answered

After some updates on my Manjaro Linux system I ran into an issue with rake tasks in rubymine.

No rake tasks are available and when I click [Reload rake tasks list] I get:

`Cannot run program bundle (in dir): error = 2, No such file or directory`

 

The ruby mine version:  2018.3.3-2

Ruby-gems: 2.7.7-1

Ruby: 2.5.3-1 

(My project can't handle newer versions)

 

If I run the commands (bundle, rake, etc) in the command line in the project dir it works fine.

Running the process also does, only the rake tasks.

10 comments

RubyMine 2018.3.4
Build #RM-183.5429.43, built on February 6, 2019
JRE: 1.8.0_152-release-1343-b26 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.3

I got the same problem, with ruby 2.6.1 and rails 5.2.2.

Manual bundle install is working but warning message appear if I run it via Rubymine.

 

 

0

Hello,

would it be possible to check how it goes in RubyMine 2019.1 EAP?

0

path/to/project/bin/rails

  Warning:Cannot run program "bundle" (in directory "/path/to/project"): error=2, No such file or directory

I got the above warning message. Tested with EAP.

RubyMine 2019.1 EAP
Build #RM-191.5849.30, built on February 28, 2019
RubyMine EAP User
Expiration date: March 30, 2019
JRE: 1.8.0_202-release-1483-b31 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.3

0

Could you please specify what kind of Ruby you're using (local or remote one, system or managed by a version manager)? Does the problem persist with another SDKs? Does it help in case you run `gem install bundler` manually?

1

Ruby managed by rbenv.

ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-darwin18]

 

If i run the bundle install in Rubymine's terminal, no error is shown.

The error appears only if i run it via "Menu -> Tools -> Bundler -> Install".

Error:Cannot run program "bundle" (in directory "/path/to/project"): error=2, No such file or directory

 

By the way, sometimes it shows as "Warning:". Sometimes it shows as "Error:".

 

 

0

Sorry for the delay in response. Could you please check how it goes in case you install bundle gem manually to the SDK in question?

0

I get the same error on my macOS Mojave (10.14.4 (18E226)) after updating to 2019.1 version. Any solution?

0

I got the same error with rbenv on Linux. Does it seem to be caused by ignoring the rbenv shims? rbenv sets the shims path in .bashrc. RubyMinde certainly ignores this setting in my case. If so, you should fix this bug.

0

How does it go in case you run RubyMine from the Terminal? In addition, could you please check 2019.1.2 version.

0

After i installed bundler to the 'system', this issue was fixed.

In my case, i got these versions installed with rbenv.

$ rbenv versions
* system (set by /home/um/.rbenv/version)
2.4.1
2.5.1
2.5.5
0

Please sign in to leave a comment.