Where to put Play package for console to recognize command? - scala

Download binary packages on https://www.playframework.com/documentation/2.0/Installing gives me a play-2.0 folder with play exec file. However running play on that same directory using console returns
play: command not found
My environment is MAC and I tried
chmod a+x play
while running into the same problem
Can someone give me a guide on the installation process?

When we run a command, the shell look for this file (command) in a list of directories (folders). This list of directories is stored in a enviroment variable called PATH. If you want to see the values inside PATH. You can run:
echo $PATH
Note that the folders are separated by :.
The problem you are facing is because the shell can't find a dir that contains the file play. This happens because the play's dir is not in PATH
You can add play's dir to your PATH by running
export PATH=$PATH:/path/to/your/play/dir
This is a temporary thing. After you exit your shell session you will loose it. To make it permanent you need to edit the .bash_profile file in your home folder and add this command in the end of the file and save it.

Related

How to install mongosh after installing MongoDB on Windows?

The instruction is given but I am not able to understand what is the desired location in my file system here.
Can anyone clear my doubt?
On my Windows system, I created a directory C:\bin to hold misc executable programs. That directory is added to the PATH environment variable.
mkdir c:\bin
set PATH=c:\bin;%PATH%
Download the zip file, extract mongosh.exe to C:\bin.

Build libraries in external folder of AOSP source code

I noticed that a simple
$ . build/envsetup.sh
$ lunch
$ aosp_hammerhead-eng
$ make -j16
Would not build also the external libraries in the ./external folder.
How am I supposed to build source code in such folder?
In particular, I am modifying source code in the libselinux in ./external/selinux/libselinux/src/
Thanks!
I found out that, by using the mm command, it is possible to build all of the modules in the current directory.
So, if you are in ./external/selinux/libselinux/ you can build all code inside such directory just by typing the command mm.
I also found that the same code I was modifying inside the ./external/selinux/libselinux/ is also located in ./external/libselinux/. However, this directory is linked to the make -j16 command.

Unable to install plugin hostmanager in vagrant in windows 8.1

Not able to install plugin its showing the below error...
C:\devbox>vagrant plugin install 'vagrant-hostmanager'
The directory where plugins are installed (the Vagrant home directory)
has a space in it. On Windows, there is a bug in Ruby when compiling
plugins into directories with spaces. Please move your Vagrant home
directory to a path without spaces and try again.
Ruby (language used by Vagrant) has "issues" with directory names that contain spaces.
Vagrant will use an environment variable (supplied by windows) to tell it where your user directory is (so it can decide where to put your "home" directory). But you might have a space in your user name (I do) which causes a problem for ruby (which is doing the work to install the plugin).
The solution is to move your project to a project directory you choose that doesn't have any spaces in the directory name. Then, use an environment variable called VAGRANT_HOME and set it to a specified directory. The plugin installation procedure will check for the existence of this variable and use it if it exists instead of locating a home directory within the windows current user directory.
I created a folder called home within C:\Hashicorp\Vagrant and used that (C:\Hashicorp\Vagrant\home).
Setting windows environment variables is not hard (rather trivial actually) - you can find out how here: http://www.computerhope.com/issues/ch000549.htm
You'll have to do a restart to your system for it to take effect (it all worked after a reboot for me).
I've found a slight variation to the #Reinsbrains answer. In order to have a home directory without spaces within its name. I created a junction to my user/home directory. In my case I decided to go with a Linux style structure, but any location would work. In an admin command prompt:
mkdir c:\home
mklink /j c:\home\maarten "c:\users\Maarten Bicknese"
Next set the VAGRANT_HOME environment variable to the newly created junction.
setx VAGRANT_HOME c:\home\maarten
Fire up a new command prompt and you're good to go!

Can't modify a file programmatically in Meego/Harmattan

I am developing a Meego/Harmattan application, in my package there is a file x.dat that I need to write in it using my executable foo app, the Debian package succeeds and installs x.dat in /opt/foo/bin but when I debug, the application foo refuse to fopen the file successfully for a subsequent fwrite, Is this related a missing Aegis manifest entry?, what is the correct sentence of that entry and is it done manually?
Note: I tried without success to use different path for the installation of the data file x.dat, this includes trying /home/user.
Thanks in advance,
Your application does not have permission to write to /opt as it is run as user. You have to put the file in /home/user/.yourapp/ and chown it to user:user in the postinstall script. (You could also chown the file right in /opt but it is not recommended)

ttf2ufm: command not found

I'm trying to install a font for use with TCPDF. To do so, I need to run the included command line utility ttf2ufm. (Included with TCPDF in fonts/utils/ttf2ufm) When I run it though, I get the error -bash: ttf2ufm: command not found. I'm probably just overlooking something simple, but I've searched and can't find what I'm missing here.
Should mention I'm using Debian Lenny.
Perhaps you do not know how commands are executed in bash.
If the program is not in the path, you need to specify the path to get it to run.
If you are in the right directory.
.../fonts/utils/ $ ./ttf2ufm ....
Note the ./ in front of it, that gives the file a path, in the present working directory, or the full path will work, or any other relative path. Just using ttf2ufm on its own will not, as the current directory is not usually part of the executable path.
Additionally, the program will need its executable bit set.