Why isn't my service found? I'm trying to load a service into my Drupal module, but even after checking twice whether I did something wrong, I can't seem to find any error in my code as I did everything as the documentation said and Drupal still gives me a non-existent service error.

Here's the my services.yml file:

services:
  rb_weather.wunderground:
    class: Drupal\rb_weather\WundergroundWeather


Here's the config form code (the part loading the service):

class RBWeatherSettingsForm extends ConfigFormBase
{
/**
 * @var WeatherInterface
 */
private $wunderground;

public function __construct(ConfigFactoryInterface $config_factory,    WeatherInterface $wunderground)
{
    parent::__construct($config_factory);

    $this-&gt;wunderground = $wunderground;
}

public static function create(ContainerInterface $container)
{
    return new static(
        $container-&gt;get('config.factory'),
        $container-&gt;get('rb_weather.wunderground')
    );
}


I have included the classes using the "use" command as PhpStorm doesn't complain about that, however, Drupal does not want to recognize it.

My service classes as well as the services.yml file are placed under rb_weather/services folder.

Thanks a lot.
Not certain, but it sounds like your files may not be in the correct places based on your description.

The services.yml should be in the root of your module, not in a sub folder. 

Also, your service classes should be in a /src/ folder. It would be okay to have them in a /src/services folder if you want, but module namespaces in drupal start in the module's /src/ folder, not in the root; the reason for this is because drupal uses the PSR-4 naming conventions, which specify that structure. You can find more info about how drupal modules should be structured here: https://www.drupal.org/node/2156625