Setting an environment variable for play framework

2019-09-21 10:46发布

问题:

I have installed play framework on Ubuntu 12.4 and I want to be able to just call play from terminal without specifying it's full path. I've tried exporting the path and so on, but it does not work because for some reason, another application called play starts instead. Problem is I cannot find that application's path in the paths file. What am I doing wrong?

回答1:

To find the thing that is in your path named play run:

which play


回答2:

I had the same problem with ubuntu 14.01. Steps i followed to fix the issue:

  1. On the cli type
    which play
    . Result for my case was
    /usr/bin/play 
    which was not my play framework application.
  2. Rename symbolic link to point to your play framework directory with the below commands.

sudo rm /usr/bin/play
sudo ln -s /opt/play-2.1.1/play/usr/bin/play