Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error: not found: value b3 #60

Closed
sallareznov opened this issue May 28, 2016 · 6 comments
Closed

Compilation error: not found: value b3 #60

sallareznov opened this issue May 28, 2016 · 6 comments

Comments

@sallareznov
Copy link

Hi,
I just started to use your library but I'm having a compilation problem. I use Play Framework in its 2.5 version, and I added the play-bootstrap dependency in my build.sbt file :

"com.adrianhurt" %% "play-bootstrap" % "1.0-P25-B3"

Here is what I have in my template:

@import models.FareData
@import b3.vertical.fieldConstructor
@(fareForm: Form[FareData])(implicit messages: Messages)

<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" href="@routes.Assets.at("stylesheets/index.css")">
    </head>
    <body>
        <div id="container">
            @b3.form(routes.WebsiteController.computeFarePrice()) {
                @b3.email( fareForm("email"), '_label -> "Email", 'placeholder -> "example@mail.com" )
                @b3.password( fareForm("password"), '_label -> "Password", 'placeholder -> "Password" )
                @b3.checkbox( fareForm("remember"), '_text -> "Remember me", 'value -> true )
                @b3.submit('class -> "btn btn-default"){ Sign in }
            }
        </div>
    </body>
</html>

When I compile my sources, Play tells me that I can't use b3 helpers (Compilation error[not found: value b3])

play.sbt.PlayExceptions$CompilationException: Compilation error[not found: value b3]
    at play.sbt.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27)
    at play.sbt.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27)
    at scala.Option.map(Option.scala:145)
    at play.sbt.run.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:49)
    at play.sbt.run.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:44)
    at scala.Option.map(Option.scala:145)
    at play.sbt.run.PlayReload$.taskFailureHandler(PlayReload.scala:44)
    at play.sbt.run.PlayReload$.compileFailure(PlayReload.scala:40)
    at play.sbt.run.PlayReload$$anonfun$compile$1.apply(PlayReload.scala:17)
    at play.sbt.run.PlayReload$$anonfun$compile$1.apply(PlayReload.scala:17)
@adrianhurt
Copy link
Owner

It's strange. Have you tried to clean the project, exit and run it again?

@sallareznov
Copy link
Author

Oh, it works. I restarted my server and that did the trick. Thanks for the library and for your fast feedback. :)

@sallareznov
Copy link
Author

My problem is solved. I'm closing the issue.

@adrianhurt
Copy link
Owner

You're welcome!

@anubhav100
Copy link

having same problem help please

@adrianhurt
Copy link
Owner

Hi, if your project doesn't find the b3 value is probably due to an installation problem. To install the plugin you only need to add this to build.sbt:

libraryDependencies ++= Seq(
  "com.adrianhurt" %% "play-bootstrap" % "1.0-P25-B3"
)

where you can change 1.0-P25-B3 for your corresponding version of Play and Bootstrap.

Then, execute clean inside activator and exit, and finally run activator again and try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants