Issue with Ruby version on target system

23 views
Skip to first unread message

lift...@gmail.com

unread,
Jul 28, 2023, 3:31:44 PM7/28/23
to Ansible Project
I have a role that will install Redmine onto a RHEL 8 system.  When I run the playbook and it tries to install "bundler", I get the following error:

ERROR:  Error installing bundler:
bundler requires Ruby version >= 2.6.0. The current ruby version is 2.5.0.

I have installed Ruby 2.7.8 on the target system using rvm, but I still get that error.  How can I have the playbook recognize that Ruby 2.7.8 is installed and the default to eliminate this error?

Thanks,
Harry

Dick Visser

unread,
Jul 28, 2023, 5:57:23 PM7/28/23
to ansible...@googlegroups.com
Without seeing any tasks or plays that would be hard.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f63f28aa-2e8f-4980-8b41-4b2c3da4117cn%40googlegroups.com.
--
Sent from Gmail Mobile

lift...@gmail.com

unread,
Jul 29, 2023, 8:31:08 PM7/29/23
to Ansible Project
Here's the section of the role:

- name: Install latest Bundler gem
  ansible.builtin.gem:
    name: bundler
    state: present
    user_install: false
    executable: /bin/gem
  changed_when: false


Thanks,
Harry

Rilindo Foster

unread,
Jul 31, 2023, 10:49:26 AM7/31/23
to ansible...@googlegroups.com
Being somewhat familiar with rvm, has the gem binary been (sym)linked to the version of ruby deployed with rvm? Alternatively, you can probably set the executable attribute to point to an explicit path of the gem binary (as opposed to defaulting to /bin/gem)



--
---
Rilindo Foster - DevOps
NextCapital Group, Inc.
104 S. Michigan Avenue, Suite 1400
Chicago, IL  60603-5958

NextCapital is a subsidiary of Goldman Sachs Asset Management and part of The Goldman Sachs Group, Inc. All rights reserved.
See http://www.gs.com/disclaimer/global_email for important risk disclosures, conflicts of interest and other terms and conditions relating to this e-mail and your reliance on information contained in it.  This message may contain confidential or privileged information.  If you are not the intended recipient, please advise us immediately and delete this message. See http://www.gs.com/disclaimer/email for further information on confidentiality and the risks of non-secure electronic communication.  If you cannot access these links, please notify us by reply message and we will send the contents to you.
 
Reply all
Reply to author
Forward
0 new messages