# msg: \[Errno 2\] No such file or directory when using bundle

**URL:** <https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-when-using-bundle/19057>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [August 19, 2015, 3:35pm UTC](https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-when-using-bundle/19057 "2015-08-19T15:35:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Derrick\_Mar](https://avatars.discourse-cdn.com/v4/letter/d/45deac/32.png) [@Derrick\_Mar](https://forum.ansible.com/u/Derrick_Mar)\
**Post date:** [August 19, 2015, 3:35pm UTC](https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-when-using-bundle/19057/1 "2015-08-19T15:35:47Z")

</div>

Hello Ansible community!

I’m just getting started with Ansible, and seem to be not understanding why this happens.

My playbook

- name: bundle install  
command: “bundle install”

args:  
chdir: “~/ai\_grading\_production/”

I get the error msg: [Errno 2] No such file or directory when using bundle

When I actually specify the full path it works  
command: “/home/ubuntu/.rvm/gems/ruby-2.2.2/wrappers/bundle install”

When I use the shell module it error with this message  
stderr: /bin/sh: 1: bundle: not found

Does anyone know why I have to specify the full path to use the bundle command. And how can I fix? Thank you!

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [August 20, 2015, 3:02am UTC](https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-when-using-bundle/19057/2 "2015-08-20T03:02:31Z")

</div>

bundle is not in your PATH, changing to a directory does not include  
it in your PATH (unless your PATH has ./ which is really not  
recommended).

---

<div class="post-metadata">

**Author:** ![Marcus\_Franke](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@Marcus\_Franke](https://forum.ansible.com/u/Marcus_Franke)\
**Post date:** [August 20, 2015, 4:44am UTC](https://forum.ansible.com/t/msg-errno-2-no-such-file-or-directory-when-using-bundle/19057/3 "2015-08-20T04:44:09Z")

</div>

Hi

You are running into a typical rvm error. I assume you have some special rvm ruby version with a custom gemset.

The problem is, Ansible has to do the same rvm use ruby-2.1.5@gemset like you would do in your shell. Unless you are using the .ruby-(version|gemset) dotfiles.

Ansible does not know about this magick and is running your system ruby’s bundler command.

Kind regards  
/mf
