GithubHelp home page GithubHelp logo

install ping-play about ping-play HOT 5 CLOSED

brikis98 avatar brikis98 commented on May 18, 2024
install ping-play

from ping-play.

Comments (5)

brikis98 avatar brikis98 commented on May 18, 2024

Did you have activator (i.e., the SBT shell) running in the background after you added the dependency (so you just ran the compile command) or did you restart it (so you exited the shell and ran activator compile)?

I haven't used Eclipse in a long time, so I'm not sure how to debug it, but here's an experiment to see if the ping-play dependency is being pulled in correctly: create a Scala class anywhere in the project and import com.ybrikman.ping.scalaapi.bigpipe.BigPipe. If the code compiles, then the dependencies are being pulled in correctly, at least by the actual app.

To add big-pipe.js to your project, just add the following line in your templates:

<script src="/assets/com/ybrikman/ping/big-pipe.js"></script>

The source for big-pipe.js is here.

from ping-play.

shay-te avatar shay-te commented on May 18, 2024

i just run the "activator compile" command.
i placed "import com.ybrikman.ping.scalaapi.bigpipe.BigPipe" in my Application.java, and my application compiles
but when i am adding "FakeServiceClient" i am getting this error

[error] ... project path..../app/controllers/Application.java:9: package helper does not exist
[error] helper.FakeServiceClient
[error] ... project path..../app/controllers/Application.java:12: cannot find symbol
[error]   symbol:   class FakeServiceClient
[error]   location: class controllers.Application
[error] FakeServiceClient

this is my src

import javax.inject.Inject;

import play.mvc.Controller;
import play.mvc.Result;
import views.html.index;
import com.ybrikman.ping.scalaapi.bigpipe.BigPipe;
import helper.FakeServiceClient;

public class Application extends Controller {
    private final FakeServiceClient serviceClient;

    @Inject
    public Application(FakeServiceClient serviceClient) {
        this.serviceClient = serviceClient;
    }

    public Result index() {
        return ok(index.render("Your new application is ready."));
    }

}

from ping-play.

brikis98 avatar brikis98 commented on May 18, 2024

FakeServiceClient is part of the sample code. It is (intentionally) not exported as part of the ping-play jar as most users have real clients to use instead. Probably the easiest way to use it is to just copy the code into your project.

from ping-play.

shay-te avatar shay-te commented on May 18, 2024

thanks for the direction.
its more clear to me now :)

from ping-play.

brikis98 avatar brikis98 commented on May 18, 2024

No problem. I'll close the issue for now, but feel free to open others if you hit other problems.

from ping-play.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.