Shared Hosting for Everyone, imagined by developers, for developers.Discovering the Public Cloud
[version] have to be replaced by the name of the package and version to be installed.
The default version can be changed from the administration section, under Environment > Ruby. This is the version that is especially used when you start
Versions are not necessarily already installed.
You can view the error logs in the
$HOME/admin/logs/uwsgi/[id].log file where [id] is the identifier for your site, shown in the Web > Sites section.
An extract of these logs is presented in the administration’s interface (Logs - 📄).
You need to always use
/usr/bin/ruby). Never use
ruby2.4 or any other command.
To force the use of a different version of Ruby other than the default one, define the environment variable
$ RUBY_VERSION=2.3 ruby
In your scripts, use
/usr/bin/ruby as shebang:
To force the use of a specific version of Ruby:
#!/usr/bin/eval RUBY_VERSION=2.3 ruby
The other binaries included in Ruby (
ri, etc.) work the same way.
Your Ruby environment starts off empty, with no ready installed libraries other than the standard library.
You can use
gem to install packages:
$ gem install [package]
Packages are installed in the standard
$HOME/.gem directory and they are automatically added to load path by Ruby.
Note that you will need to re-install the packages if you change the major Ruby version (versions 2.3 and 2.4 are two different major versions, whereas 2.3.1 and 2.3.0 use the same major version).
You can specify a specific version:
$ gem install [package] -v [version]
$ gem uninstall [package]
We recommend using Bundler if you use a number of different Ruby applications so that each one has its own separate environment. Bundle installs the packets listed in a Gemfile.
$ bundle install
So that a Rack application is accessible by the web, you need to add a site in the alwaysdata administration Web > Sites section:
You can also fill-in a number of optional fields: