Choosing a version of Ruby
You can choose among multiple versions of Ruby:
|Ruby version||Command-line path||Sunset Date|
|2.7 (default)||/opt/rubies/ruby-2.7/bin/ruby||approx. April 1, 2023|
|3.0||/opt/rubies/ruby-3.0/bin/ruby||approx. April 1, 2024|
If you need to switch Ruby versions, you can do so by creating or editing
.silk.ini file (for example
~/www-root/.silk.ini) and adding the
version to the
[ruby] version = 3.0
Valid version choices are
default, any of the versions listed in the table
newest (which provides the newest available on the system).
.silk.inifile in your site root. Add a section similar to the following.
[app] type = ruby root = myapp document-root = public startup-script = config.ru env.RAILS_ENV = production
.silk.inisection name should be either "app" or any descriptive name you wish for your application that starts with "app: ". This could be useful if you wish to configure multiple apps.
root is an optional directory under your site root containing all your application files.
document-root is the directory under your app root in which static files will be located.
startup-script is the name of the script launching your application, which should have executable permissions (
chmod u+x config.ru).
Any line beginning with env. will set an environment variable available within your application.
If this is the first web application in your site, a new app server will be started for your account within ten minutes.
Load your application with
silk app <hostname> load. If you have multiple sites and/or multiple apps,
<hostname>is followed by the URI path of your app, such as
dev.mynetid.w3.uvm.edu/app2. If you see an error, check the app server log for details.
An application needs to be restarted for code changes to take effect. You can do this the same way you originally loaded your application:
[myusername@silk21 ~]$ silk app <hostname> load
App server logs are available at
Ruby libraries are managed using the
You can see which libraries are currently installed by typing
Additional modules can be installed by typing
gem install --user-install <libraryname>,
which will place them in your home directory, under