siteleaf/siteleaf-gem

Check that you are using the correct API keys

devinhalladay opened this issue · 1 comments

Okay, so I'm trying to run Sass and the Siteleaf server at the same time using Foreman. In my Procfile I have this:

server: siteleaf server
sass: sass --watch styles/sass:styles/

Sass runs perfectly, and Siteleaf returns no errors until I visit localhost:9292, where I see this error: Check that you are using the correct API keys.

I have no idea what's causing this...when I run a plain siteleaf server, the site works fine; so I can safely assume that my ~/.siteleaf file and my config.ru are both configured correctly.

This error typically means the Siteleaf local server cannot find your credentials, or they are incorrect.

I tried out the same setup using Foreman and Sass on my Mac and everything seemed to work smoothly. Are you on Windows? It sounds like Foreman might be trying to run in another directory, or perhaps cannot access your ~/.siteleaf file due to permissions.

Here are a few things you could try:

  1. Make sure you are running the latest gem versions of Foreman, Sass, and Siteleaf.
  2. Delete your ~/.siteleaf file and run siteleaf auth to reauthorize your API credentials.
  3. Try running Siteleaf in Foreman without Sass in your Procfile for comparison.

As a last resort, you could add your API credentials directly into your config.ru file, like this:

# config.ru
require 'siteleaf'
Siteleaf.api_key = '...'
Siteleaf.api_secret = '...'
run Siteleaf::Server.new(:site_id => '...')