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.

16 comments
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

Hello,

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

0
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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

0
Comment actions Permalink

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
Comment actions Permalink

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

0
Comment actions Permalink

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
Comment actions Permalink

I have same trouble. 

Using rbenv (anyenv) .

environment:

❯ rbenv versions
system
2.3.7
* 2.4.6 (set by /Users/ikezawa-ryota/src/github.com/path/to/app/.ruby-version)
2.5.1
2.5.3
2.6.0
2.6.3
0
Comment actions Permalink

@Pagegy

Why not install bundler after switched to the 'system'? It fixed in my case.

 

$ rbenv shell system
$ sudo gem install bundler
0
Comment actions Permalink

@Jumeno

Thanks for replying.

 

> Why not install bundler after switched to the 'system'? It fixed in my case.

 

I tried to use system ruby, but it didn't working.

And, I wanna use multiple ruby version for that reason engaging in multi projects.

 

Why not other ruby versions recomended?

0
Comment actions Permalink

I don't know why RubyMine requires me to install the bundler in 'system' env. It's assured that it was fixed only when I installed in the 'system' env.

RubyMine doesn't seem to show the system env now after I deleted the global configuration (~/.rbenv/version).

0
Comment actions Permalink

I checked it.

I make a path to rbenv's ruby included bundler 1.17.3. 

 

❯ rbenv versions
* system (set by RBENV_VERSION environment variable)
2.3.7
2.4.6
2.5.1
2.5.3
2.6.0
2.6.3

❯ sudo gem list | grep bundle
bundler (1.17.3)

 

> RubyMine doesn't seem to show the system env now after I deleted the global configuration (~/.rbenv/version).

 

thanks.

I'll try it.

0
Comment actions Permalink

Sorry, I resolved this issue.

I generated shell scripts and run intellj editor from shell.

It was succeeded.

0

Please sign in to leave a comment.