Setting an environment variable for play framework

空扰寡人 提交于 2019-12-13 10:41:15

问题


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


来源:https://stackoverflow.com/questions/12930386/setting-an-environment-variable-for-play-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!