Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundle install - bundle not found #132

Closed
davemckenna01 opened this issue Dec 28, 2016 · 8 comments
Closed

bundle install - bundle not found #132

davemckenna01 opened this issue Dec 28, 2016 · 8 comments

Comments

@davemckenna01
Copy link

davemckenna01 commented Dec 28, 2016

I have successfully installed rvm, but I'm unable to "bundle install" from within my ruby project. The bundle bin is not found.

- name: Install Repo Deps (From Gemfile)
  become: true
  become_user: '{{ ansible_user }}'
  command: bundle install
  args:
    chdir: "{{ code_dir }}/{{ item.name }}"
  with_items: "{{ repos|byattr('lang', 'ruby') }}"

results in:

"[Errno 2] No such file or directory"

- name: Install Repo Deps (From Gemfile)
  become: true
  become_user: '{{ ansible_user }}'
  shell: bundle install
  args:
    chdir: "{{ code_dir }}/{{ item.name }}"
  with_items: "{{ repos|byattr('lang', 'ruby') }}"

results in:

"/bin/sh: 1: bundle: not found"

But when I shell in to my vagrant box, bundle works fine, I can bundle install:

$ which bundle
/home/vagrant/.rvm/gems/ruby-1.9.3-p551@global/bin/bundle

The Ansible bundle module also doesn't work. I have to explicitly specify the executable, and then it errors with this:

- name: Install Repo Deps (From Gemfile)
  bundler:
    state: present
    chdir: "{{ code_dir }}/{{ item.name }}"
    executable: /home/vagrant/.rvm/gems/ruby-1.9.3-p551@global/bin/bundle
  with_items: "{{ repos|byattr('lang', 'ruby') }}"

error: "/usr/bin/env: ruby_executable_hooks: No such file or directory"

Any ideas what's up?

@jrgifford
Copy link
Member

(I edited this issue a little to show everything as code blocks instead of misinterpreted markdown)

@lpaulmp
Copy link
Member

lpaulmp commented Jan 6, 2017

@davemckenna01 This is duplicate issue #128

@lpaulmp lpaulmp closed this as completed Jan 6, 2017
@lucascj
Copy link

lucascj commented May 23, 2018

I seem to have this same issue. Root install of rvm when I try to run a gemfile using bundler module it generates the same error. Ansible 2.5.3 and latest rvm_io.ruby.

error: "/usr/bin/env: ruby_executable_hooks: No such file or directory"

@ghost
Copy link

ghost commented Jun 22, 2018

i have sam issue,

@Pepan
Copy link

Pepan commented Nov 21, 2018

Me too ...
I did

    - role: rvm.ruby
      vars:
        tags: ruby
        rvm1_rubies: ['ruby-2.5.3']
        rvm1_user: "{{main_user}}"

on Centos 7

  • rvm.ruby, v2.0.1

@marzdgzmn
Copy link

I'm experiencing the same issue on CentOS 7 using v2.1.2. Has anyone found any resolution for this?

@Pepan
Copy link

Pepan commented Sep 6, 2019

I created hook my self instead

 - name: Link {{app_id}} rvm wrapper
  file:
    src: /home/{{main_user}}/.rvm/gems/ruby-{{ ruby_version }}/wrappers/puma
    dest: /home/{{main_user}}/.rvm/bin/{{app_id}}_puma
    owner: "{{main_user}}"
    group: "{{main_user}}"
    state: link

@marzdgzmn
Copy link

I created hook my self instead

 - name: Link {{app_id}} rvm wrapper
  file:
    src: /home/{{main_user}}/.rvm/gems/ruby-{{ ruby_version }}/wrappers/puma
    dest: /home/{{main_user}}/.rvm/bin/{{app_id}}_puma
    owner: "{{main_user}}"
    group: "{{main_user}}"
    state: link

Thanks. I thought I could make this work if I installed it using root, unfortunately, it gives me the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants