Things not working as expected? Here are a few things to try.
If you’re not setting any data in your dashboard, or if you’ve just installed Rails Autoscale and you’re stuck on the verification step, the first thing to verify is that the
rails_autoscale_agent middleware is installed in your app.
You’ll do this in a terminal, using the Heroku CLI. Note that you may also need to include
--app [your-app-name] if the CLI can’t automatically determine the app for you.
heroku run rails runner 'puts RailsAutoscaleAgent::VERSION'
You should see something like this:
Running rails runner "puts RailsAutoscaleAgent::VERSION" on ⬢ ra-demo... up, run.9799 (Free) I, [2020-05-31T14:55:04.011010 #4] INFO -- : [RailsAutoscale] Preparing middleware 0.8.3
The last line of output is the version of the gem. You’ll want that number to match the latest release.
If instead you see something like this:
uninitialized constant RailsAutoscale
This means gem is not installed (or at least it’s not be required). Here are a few things to check:
If you see this message:
bash: rails: command not found
This means you’re not running a Rails app, which you probably already know. If you’re running a Rack-based Ruby app, you can still use Rails Autoscale, but you need to manually require the gem and insert the middleware. This will be different depending on your app framework.
If you are not running a Ruby application (Node, Python, Java, etc.), Rails Autoscale is not compatible with your app.
At this point you’ve verified that you’re running the latest gem version, and that it has successfully deployed. Now let’s make sure it’s reporting metrics to the Rails Autoscale service as expected.
heroku logs --tail | grep RailsAutoscale
While tailing your logs, open another terminal window and restart your app.
You should see some or all of the following in your logs:
[RailsAutoscale] Preparing middleware [RailsAutoscale] Reporter starting, will report every 15 seconds or so [RailsAutoscale] Reporting 4 measurements
If you see a failure message, there may be additional details filtered out by the
grep command. Try running
heroku logs --tail again without the
grep to see more contextual details. Contact [email protected] for support.