Ruby

Ruby A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. You can easily add it to your Lando app by adding an entry to the services key in your app's .lando.yml.

Supported versions

Using patch versions

While Lando does not "officially" support specifying a patch version of this service you can try specifying one using overrides if you need to. This is not guaranteed to work so use at your own risk and take some care to make sure you are using a debian flavored patch version that also matches up with the major and minor versions of the service that we indicate above in "Supported versions".

Here are all the tags that are available for this service.

Example

# Ruby server
name: ruby

# Give me http://ruby.lndo.site and https://ruby.lndo.site
proxy:
  appserver:
    - ruby.lndo.site

# Spin up services to run a basic ruby server
services:

  # Create a ruby instance
  appserver:

    # Ruby version 2.4
    type: ruby:2.4

    # Install travis gem
    install_dependencies_as_me:
      - gem install travis

    # Optionally create certs in /certs that can be used by your application
    # to listen over https. Creates the following certs your app can use
    #
    #   - /certs/cert.key
    #   - /certs/cert.crt
    #   - /certs/cert.pem
    #
    # ssl: true

    # Optionally specify a command/script to run when you start your ruby service up.
    #
    # If you are using ruby as a server you are going to want to define this.
    # This can be either a string or array.
    #
    # If you are just spinning up a ruby container for usage as a cli tool
    # you can leave this blank and the container will boot up and stay on
    #
    # You will likely want to run needed build steps eg `lando bundler install`
    # first so needed dependencies are installed before your server starts up.
    #
    command: ruby /app/server.rb

# Add some nice command routing
tooling:
  gem:
    service: appserver
  ruby:
    service: appserver
  bundler:
    service: appserver
  travis:
    service: appserver

You will need to rebuild your app with lando rebuild to apply the changes to this file. You can check out the full code for this example over here.

results matching ""

    No results matching ""