Question

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
Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top