public function activateModule($namespace, $activateDependencies = false)
    {
        $namespace = Framework::prepareNamespace($namespace);

        // If the module already is activated we won't activate it again
        if (isset($this->activatedModules[$namespace])) {
            return true;
        }
        
        // Search the path for the module and initialize it
        $path = $this->searchModulePath($namespace);
        if ($path === false) {
            throw new Exception('Can not find the module "' . $namespace . '".');
        }
        
        // Get the version
        $moduleProperties = $this->parseModuleJson($path);
        $version = $moduleProperties->module->version;
        
        $module = $this->initializeModule($path, $activateDependencies);
        $module->activate($version, 0);
        
        // Save the path in the activated modules array
        $this->activatedModules[$namespace] = array('version' => $version, 'path' => $path);
        $this->saveActivatedModules();
        
        return true;
    }