title: RatpackServer.start in connection with ratpack-pac4j causes non-static context error
body: <p>I have got very incomprehensible (for me) trouble with RatpackServer's start method. </p>
  
  <p>Fristly, I mean this method</p>
  
  <pre><code>static RatpackServer start(Action&lt;? super RatpackServerSpec&gt; definition)
                  throws Exception
  </code></pre>
  
  <p>and here is my code:</p>
  
  <pre><code>public static void main(String... args) throws Exception {
  
      ProgramInitializer programInitializer = new ProgramInitializer();
      programInitializer.initialize();
  
  
      RatpackServer.start(b -&gt; b
              .serverConfig(s -&gt; s
                      .baseDir(BaseDir.find())
                      .env()
              )
              .registry(
                      Guice.registry(s -&gt; s
                              .module(TextTemplateModule.class, conf -&gt;
                                      conf.setStaticallyCompile(true)
                              )
                              .bindInstance(ServerErrorHandler.class, (ctx, error) -&gt; {
                                  logger.error("Unexpected error", error);
                                  ctx.render(groovyTemplate("error500.html"));
                              })
                              .bindInstance(ClientErrorHandler.class, (ctx, statusCode) -&gt; {
                                  ctx.getResponse().status(statusCode);
                                  if (statusCode == 404) {
                                      ctx.render(groovyTemplate("error404.html"));
                                  } else if (statusCode == 401) {
                                      ctx.render(groovyTemplate("error401.html"));
                                  } else if (statusCode == 403) {
                                      ctx.render(groovyTemplate("error403.html"));
                                  } else {
                                      logger.error("Unexpected: {}", statusCode);
                                  }
                              })
                      )
              )
              .handlers(c -&gt; { c
                                  .get("index.html", ctx -&gt; {
                                      //ctx.redirect(301, "/");
                                      logger.debug("Retrieving user profile...");
                                      final Map&lt;String, Object&gt; model = Maps.newHashMap();
                                      RatpackPac4j.userProfile(ctx)
                                              .route(Optional::isPresent, p -&gt; {
                                                  model.put("profile", p);
                                                  ctx.render(groovyTemplate(model, "index.html"));
                                              })
                                              .then(p -&gt; {
                                                  ctx.render(groovyTemplate(model, "index.html"));
                                              });
                                      //
                                  })
                                  //.get(ctx -&gt; ctx.render(groovyTemplate("index.html")))
  
                                  .get("hello", ctx -&gt; {
                                      RelativisticModel.select();
                                      //String energy = System.getenv("ENERGY");
                                      //Amount&lt;Mass&gt; m = Amount.valueOf(energy).to(KILOGRAM);
                                      ctx.render(programInitializer.getTweetsList());
                                  })
  
                                  .files(f -&gt; f.dir("public"));
                      }
              )
      );
  }
  </code></pre>
  
  <p>everything worked nice till I add this dependency to the build.gradle:</p>
  
  <pre><code>compile 'io.ratpack:ratpack-pac4j:1.3.3'
  </code></pre>
  
  <p>so that the whole file looks like this:</p>
  
  <pre><code>group 'pl.edu.agh.tai.tdo'
  version '1.0'
  
  apply plugin: 'java'
  apply plugin: 'idea'
  
  buildscript {
      repositories {
          maven { url "http://oss.jfrog.org/repo" }
          mavenCentral()
          maven { url "http://dl.bintray.com/robfletcher/gradle-plugins" }
          maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
          jcenter()
      }
      dependencies {
          classpath "io.ratpack:ratpack-gradle:1.0.0"
          classpath ('org.ratpack-framework:ratpack-gradle:0.9.0-SNAPSHOT')
      }
  }
  
  apply plugin: "io.ratpack.ratpack-groovy"
  
  repositories {
      maven { url "http://oss.jfrog.org/repo" }
      mavenCentral()
      maven { url "http://repo.springsource.org/repo" } // for springloaded
      maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
      jcenter()
  }
  
  mainClassName = "pl.edu.agh.tai.tdo.Main"
  
  dependencies {
  
      compile "org.ratpack-framework:ratpack-handlebars:0.9.0-SNAPSHOT"
  
      runtime "org.slf4j:slf4j-simple:1.7.12"
      compile "com.heroku.sdk:heroku-jdbc:0.1.1"
      compile "org.postgresql:postgresql:9.4-1201-jdbc4"
      compile "org.jscience:jscience:4.3.1"
  
      compile 'io.ratpack:ratpack-pac4j:1.2.0'
      compile 'org.twitter4j:twitter4j-core:4.0.4'
      compile 'ch.qos.logback:logback-classic:1.1.7'
  
      testCompile group: 'junit', name: 'junit', version: '4.11'
  }
  
  sourceSets {
      main.java.srcDir "src/main/java"
      main.resources.srcDirs "src/main/resources"
      test.java.srcDir "src/test/java"
  }
  
  task stage {
      dependsOn installDist
  }
  </code></pre>
  
  <p>After adding this dependecy in the Main class </p>
  
  <pre><code>Error:java: incompatible types: com.google.inject.Injector is not a functional interface
  multiple non-overriding abstract methods found in interface com.google.inject.Injector
  
  
  Error:(29, 22) java: method start in interface ratpack.server.RatpackServer cannot be applied to given types; required: no
  arguments found: (b)-&gt;b.ser[...]); }) 
  reason: actual and formal argument lists differ in length
  
  
  Error:(63, 56) java: invalid method reference
  </code></pre>
  
  <p>non-static method isPresent() cannot be referenced from a static context</p>
  
  <p>And above RatpackServer.start(...) in IntelliJ it's written </p>
  
  <pre><code>Non-static method start() cannot be referenced from a static context
  </code></pre>
  
  <p>Has anyone such problem? It's really a mystery for me. I try to build my first app based on Ratpack ... </p>