Ruby is a Smalltalk-like language originating in the 90s in Japan by a guy commonly going by Matz here in the West. There is no standardizing body for the language, however the Matz Ruby Interpreter (MRI) is considered the authorative implementation of what Ruby is. Several competing runtime environments have sprung up since, including: JRuby (running under the JVM); IronRuby (CLR intergation); and Rubinius. Many of the Ruby Gems (a library module) have C components specifically desigend to work with MRI and are incompatiable with other runtime environments.
Applications of Ruby are generally used in Desktop and Server environments. FreeBSD utilizes Ruby for it's portupgrade tool, while VIM offers plugin integration with the language. The most common deployment profile for Ruby is using the Ruby on Rails framework.
Using Thin from SystemD
When using the clustering option to scale horizontally, you should note the original forking process will terminate after launching all worker processes. If SystemD is configured to launch the application under Service.Type
simpleit will kill all subprocesses after the master changes. The correct configuration option for SystemD's Service.Type property is
forking. Under an unclustered configuration, one should prefer
simplethough, as the Thin service will not fork at all.
Doesn't really work in a multiuser environment; it wasn't really designed for it anyway. Primary problem is the assumption it owns the rbenv directory, so you can't install gems or new ruby versions.
Executing scripts on a Bundler project
#!/bin/bash script_name=`realpath $0` base_name=`basename $script_name` bin_dir=`dirname $script_name` base_dir=`dirname $bin_dir` export BUNDLE_GEMFILE="$base_dir/Gemfile" exec bundle exec "ruby $base_dir/$base_name.rb $@"
There are some caveats to this. The first is sometimes bundle decides it wants to consume the --help option for your script. Another is sometimes bundle will complain it can't find ruby.
Parallel Bundler Operations
Essence: bundle config --global --jobs 8