Skip to content

Ruby

Introduction

Ruby is a dynamic, general-purpose programming language, often used for web applications (e.g. with Ruby on Rails or Sinatra).

Warning:

Ruby applications belong in your home directory, not in your document root.

Versions

At the moment we only provide one version of Ruby: 3.4.8.

Connection to webserver

In order to make your application accessable from the outside, you need to connect it to the webserver, using a web backend.

Please note that your application must listen on the IP 0.0.0.0. You can choose any port between 1024 and 65535.

gem

gem is Ruby's package manager, used to install and manage additional packages.

Use it as usual inside a project to manage that project's dependencies, e.g. with a Gemfile and bundler:

[isabell@moondust ~]$ gem install bundler
[isabell@moondust ~]$ cd my-project
[isabell@moondust my-project]$ bundle install

You can also install command line tools directly:

[isabell@moondust ~]$ gem install cowsay

The resulting command (cowsay in this example) is installed to ~/.local/share/gem/ruby/3.4.0/bin, which is already on your $PATH.