如何使用rvm1-ansible角色安装rvm来运行bundle install

时间:2017-03-19 16:03:32

标签: ruby-on-rails ansible rvm

我使用rv1-ansible角色安装了rvm:

- hosts: all
  remote_user: deploy

  roles:
    - { role: rvm_io.ruby,
        tags: ruby,
        rvm1_rubies: ['ruby-2.4.0'],
        rvm1_user: 'deploy'
      }

现在我想在应用程序目录中运行bundle install:

- hosts: all
  remote_user: deploy

  tasks:
    - name: Clone git repository
      git:
        dest: /home/deploy/public_html/app_name
        repo: git@github.com:user/app_name.git

    - name: Bundle install
      bundler: 
        state: present
        chdir: /home/deploy/public_html/app_name
        executable: ~/.rvm/gems/ruby-2.4.0/bin/bundle

但是得到错误: "/usr/bin/env: 'ruby_executable_hooks': No such file or directory"

知道怎么做吗?

0 个答案:

没有答案