Ruby/Usage: Difference between revisions

From ALT Linux Wiki
Line 7: Line 7:
Usage system ruby for any other cases along with the specific production case is UNSUPPORTED.  
Usage system ruby for any other cases along with the specific production case is UNSUPPORTED.  


=== Intallation ===
=== Installation ===


Out ruby use '''rvm''' for build process. So to install an additional ruby gems or side modules, you have to add a user into ''rvm'' group:
You have to install '''ruby''' for use just type in console as root:
 
</tt># apt-get install ruby</tt>
 
=== Post install ===
 
Since our ruby uses '''rvm''' even for both '''build''' process and for '''usage''', s, for example, to install an additional ruby gems or side modules, you have to add a user into ''rvm'' group:
  </tt># usermod [USER] -aG rvm</tt>
  </tt># usermod [USER] -aG rvm</tt>
or
or
Line 15: Line 21:


And then '''''relogin''''' as the user. From time of relogin, additional gems will be installed for the user in the default '''$GEM_HOME''' folder ''/var/cache/ruby/gemie''.
And then '''''relogin''''' as the user. From time of relogin, additional gems will be installed for the user in the default '''$GEM_HOME''' folder ''/var/cache/ruby/gemie''.
==== For development ====
Development package for ruby is called as the '''libruby-devel''', it contains all the prepequisites to ''build'' an other ruby with ''rvm'' or without, along with the development headers. Just install it as follows:
</tt># apt-get install libruby-devel</tt>

Revision as of 15:59, 12 December 2023

Usage

You have to use system ruby generally for several purposes, so you have to:

  1. use application, which strictly requires ruby, like: foreman, gem-alexandria-book-collection-manager;
  2. use ruby for development only purposes on your local machine;

Usage system ruby for any other cases along with the specific production case is UNSUPPORTED.

Installation

You have to install ruby for use just type in console as root:

# apt-get install ruby

Post install

Since our ruby uses rvm even for both build process and for usage, s, for example, to install an additional ruby gems or side modules, you have to add a user into rvm group:

# usermod [USER] -aG rvm

or

$ sudo bash -c "usermod \$SUDO_USER  -aG rvm"

And then relogin as the user. From time of relogin, additional gems will be installed for the user in the default $GEM_HOME folder /var/cache/ruby/gemie.

For development

Development package for ruby is called as the libruby-devel, it contains all the prepequisites to build an other ruby with rvm or without, along with the development headers. Just install it as follows:

# apt-get install libruby-devel