play framework installation
Asked Answered
N

2

10

I am trying to install play framework 2.0.1 on ubuntu 11. I have added the path to play in ubuntu, I have SUN JRE 1.6 configured (java/javac) and I have given read/write/execute privileges to the play script. However, I am still getting the error copied below when I run 'play help' - is the play directory supposed to only contain 'documentation', 'repository', 'framework' & 'samples' subdirectories or should it contain additional subdirectories as well. Any helpful suggestions would be welcome.

java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:900)
at xsbt.boot.Locks$.apply0(Locks.scala:34)
at xsbt.boot.Locks$.apply(Locks.scala:27)
at scala.collection.mutable.FlatHashTable$class.$init$(Proxy.scala:32)
at xsbt.boot.Launch$ScalaProvider.<init>(Launch.scala:110)
at xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:84)
at org.apache.ivy.plugins.namespace.NamespaceRule.newEntry(Cache.scala:17)
at org.apache.ivy.plugins.namespace.NamespaceRule.apply(Cache.scala:12)
at xsbt.boot.Launch.getScala(Launch.scala:86) 
at xsbt.boot.Launch$.run(Launch.scala:49)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:43)
at xsbt.boot.Launch$.launch(Launch.scala:68)
at xsbt.boot.Launch$.apply(Launch.scala:14)
at xsbt.boot.Boot$.runImpl(Boot.scala:25)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.io.IOException: No such file or directory
Nkvd answered 11/5, 2012 at 22:17 Comment(1)
works when I setup the play directory in my home directory - previously I was trying /opt. I will check the permissions again for the play directory in opt and revert with any feedback. I believe I had read/write/execute permission granted and even tried running it as sudo (but it seems like I missed a step or few). Hope it helps.Nkvd
M
16

If you check the documentation you will see this warning:

extract the archive to a location where you have both read and write access (...) Running play writes some files to directories within the archive, so don’t install to /opt, /usr/local or anywhere else you’d need special permission to write to.

Mullis answered 14/5, 2012 at 0:22 Comment(2)
As the documentation says, check you have read and write access. Don't put the files on Program Files, for example.Mullis
So after I give activator write permissions, it's still not working.Cleancut
R
0

If you really want to run play in opt on your dev machine, you would probably want to chown /opt to yourself.

sudo chown yourself:yourself /opt

I don't believe this makes sense and has implications to other things in /opt and to the usual purpose of the /opt directory. Unlike typical web server environments, play has an embedded server (like nodejs). In addition, as noted before, there is a heck of a lot of file generation when you prepare a project to run. For development, I think it is always best install play in a directory you own by default like your home directory. In production, you would install and start everything as root making /opt a viable option. Also, in windows using directories requiring administrative access would require as much, if not more, unwise change. Play does not officially support windows in production mode.

Reed answered 20/2, 2016 at 17:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.