Uffizzi can recognize and execute a variety of Ruby implementations and Ruby frameworks.
General Support
For Uffizzi to recognize your Ruby app, the root directory of your GitHub repository should include a Gemfile
. Use an empty Gemfile
if your app does not include dependencies.
Rack applications should include a config.ru
file in the root directory of your GitHub repository.
If your Gemfile
specifies the railties
gem, your app will be recognized as a Rails app.
Environment
The following environment variables will be set:
GEM_PATH
=>vendor/bundle/#{RUBY_ENGINE}/#{RUBY_ABI_VERSION}
LANG
=> "en-us"PATH
=>bin:vendor/bundle/#{RUBY_ENGINE}/#{RUBY_ABI_VERSION}/bin:/usr/local/bin:/usr/bin:/bin
DISABLE_SPRING
=> 1GEM_PATH
is set to the bundler gem vendor directory.DATABASE_URL
will be set if your Uffizzi Environment has a relational database configured.RACK_ENV
=> “production” if this is a Rack or Rails appRAILS_ENV
=> “production” if this is a Rails appRAILS_LOG_TO_STDOUT
=> “enabled” if this is a Rails appRAILS_SERVE_STATIC_FILES
=> “enabled” if this is a Rails app
Execution
- Rack app containers will execute
bundle exec rackup config.ru -p $PORT
- Rails app containers will execute
bundle exec bin/rails server -p $PORT -e $RAILS_ENV
- Other Ruby apps may need help configuring their process; contact Support for this.
Dependencies
Ruby's Bundler creates a Gemfile.lock file that "freezes" specific gems. When Uffizzi builds your Ruby application, it must remove the Gemfile.lock file and install the gem versions specified in your Gemfile. For this reason (and many other reasons!) it's important to use the most specific versions you can within your Gemfile. This will keep your app's Uffizzi Environment most similar to your workstation's development environment. Windows users should be especially careful of this, since all Uffizzi Ruby containers run on Linux.
Troubleshooting
If Uffizzi cannot auto-detect your app, try one of the following troubleshooting methods: