First update the packages index and install the packages required for the ruby build tool to build ruby from source.
Install ruby dev from source.
Sudo apt get install build essential openssl libreadline6 libreadline6 dev curl git core zlib1g zlib1g dev libssl dev libyaml dev libsqlite3 dev sqlite3 libxml2 dev libxslt dev autoconf libc6 dev ncurses dev automake libtool bison nodejs subversion.
Brew install ruby installing ruby on nix install from source.
Download and unpack a tarball then just do this.
Configure make sudo make install.
After the dependancies are installed on your vps unzip the ruby file.
Append the local ruby path to the profile file present in the user s home directory.
You can find more information about building from source in the ruby readme file.
Create a ruby subdirectory to hold the ruby installation.
Compiling ruby source code.
Sudo apt update sudo apt install git curl libssl dev libreadline dev zlib1g dev autoconf bison build essential libyaml dev libreadline dev libncurses5 dev libffi dev libgdbm dev.
See the installation page for details on building ruby from source.
Click install and ruby will be installed within seconds.
It s also a good solution in the event that there are no other premade packages for your platform.
Installing from the source code is a great solution for when you are comfortable enough with your platform and perhaps need specific settings for your environment.
Fortunately ruby comes installed on yosemite and mavericks out of the box but you can easily add it on other versions by using homebrew.
Of course you can install ruby from source.
Jekyll has some dependencies which out of the box only provide raw source code.
This is a log of ruby installations on my personal and office macbooks and development and production servers at work.
Install the ruby devkit.
To make them into fully functional executables you ll probably need to install the development kit.
Echo path home local ruby bin path profile.
To install ruby using the rbenv script follow these steps.
To change pass the prefix dir option to the configure script.
By default this will install ruby into usr local.
Add the ruby binary to the search path.
If you have an issue compiling ruby consider using one of the third party tools mentioned above.
Apt update apt install y imagemagick ffmpeg libpq dev libxml2 dev libxslt1 dev file git core g libprotobuf dev protobuf compiler pkg config nodejs gcc autoconf bison build essential libssl dev libyaml dev libreadline6 dev zlib1g dev libncurses5 dev libffi dev libgdbm dev nginx redis server redis tools postgresql postgresql contrib certbot python certbot nginx yarn libidn11 dev.
Make sure you get the latest version 2 3 0 is current as of today but may not be when you are ready to install.