Edit File: ruby.cpython-311.opt-1.pyc
� 5/9e� � � � d dl mZ d dlZddlmZ d dlmZ d dlmZ d dl m Z mZmZ d dl mZ d d lmZ d d lmZ G d� de� � ZdS ) � )�absolute_importN� )�WizardInstaller)�InstallationFailedException)�MODULES_LOGS_DIR)�ExternalProgramFailed�is_litespeed_running�get_passenger_package_name)�installed_interpreters_list)� get_ui_config)�Featurec � � � e Zd Zej � ed� � Zej Z � fd�Zd� Zd� Z d� Zd� Zd� Zed� � � Z� xZS ) � RubyInstallerzruby.logc �V �� t t | � � � � � d S )N)�superr �__init__)�self� __class__s ��py/clwizard/modules/ruby.pyr zRubyInstaller.__init__ s% �� � �m�T�"�"�+�+�-�-�-�-�-� c � � g }|D ]0}d|� dd� � z }|� |� � �1| j � dd� |� � � � | j |� d S # t $ r t � � �w xY w)Nzalt-ruby�.� z-Try to install Ruby package with versions: %s�,)�replace�append� app_logger�info�join�_install_yum_groupsr r )r �versions�groups�v�package_names r �_install_ruby_versionsz$RubyInstaller._install_ruby_versions s� � ���� (� (�A�%�� � �#�r�(:�(:�:�L��M�M�,�'�'�'�'�����L�c�h�h�W_�N`�N`�a�a�a� 0�$�D�$�f�-�-�-�-��$� 0� 0� 0�-�/�/�/� 0���s �% A1 �1B c � � d}t j � |� � sdS | � d|g� � dS # t $ r t � � �w xY w)a In order to make ruby apps work on Litespeed server we need to do run extra script see docs for details: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cloudlinux:enable_passenger :return: z9/usr/local/lsws/admin/misc/enable_ruby_python_selector.shN�sh)�os�path�isfile�_run_commandr r )r �litespeed_scripts r �_configure_for_litespeed_serverz-RubyInstaller._configure_for_litespeed_server* su � � W�� �w�~�~�.�/�/� ��F� 0����t�%5�6�7�7�7�7�7��$� 0� 0� 0�-�/�/�/� 0���s �>