intellij Mac set a SDK home path to /usr - intellij-idea

Using Intellij IDEA 14.1.2 I am trying to set an Erlang SDK home path, the only option I have for doing this is a file browser that does not let me view my /usr/local file. That is, I have no option for typing the desired path. I am forced to use the Apple gui file browser (that does not show /bin or /usr)
File -> Project Structure -> SDK's
I made a sym-link, but I don't really want stray links.
ln -s /usr/local/path/to/erlang ~/erlang
I can "type" the classpath and sourcepath but not the main "Erlang SDK home path:"
any ideas?

I found a similar solution on AskDifferent posted by bmike:
Pressing shift + command + g will open a dialog where you can type the path of any folder that you want to open.
Or, you can press shift + command + . to see hidden files and then navigate to /usr/local/path/to/erlang.

Solution: installing erlang in a directory visible for Intellij IDEA
Steps:
// 1-7 could be found here http://www.erlang.org/doc/installation_guide/INSTALL.html
1. Download "OTP 17.5 Source File" from http://www.erlang.org/download.html
2. $ tar -zxf otp_src_17.5.tar.gz (unpack)
3. $ cd otp_src_17.5
4. $ export ERL_TOP='pwd'
5. $ ./configure --prefix=/users/myuser/otp (use obsolete path; "~/" didn't work for me)
6. $ make
7. $ sudo make install
//
8. File -> Project Structure -> SDK's (chose /users/myuser/otp)
9. Finally to be able to use erlang from command line still; edit or create .bash_profile in the home directory and add the erlang's directory to the PATH variable (export PATH=${PATH}:/users/myuser/otp/bin/)
10. Finally Finally :) $ source .bash_profile
For me that did the job!

I also didn't want "stray links". Nevertheless, I have tried it and it didn't even work.
Do you think it's possible to change it from some config file ~/Library/Preferences/IntelliJIdea14
I tried to add to (project.default.xml) something like with no success.

Related

Export REACT_EDITOR for VSCode

How do you complete the following PRO TIP from the Android emulator node using the Windows cmd line for VSCode?
"When you see Red Box with stack trace, you can click any
stack frame to jump to the source file. The packager will launch your
editor of choice. It will first look at REACT_EDITOR environment
variable, then at EDITOR. To set it up, you can add something like
export REACT_EDITOR=atom to your ~/.bashrc or ~/.zshrc depending on
which shell you use."
Should I use export REACT_EDITOR=code?
In what directory?
I can't find ~/.bashrc or ~/.zshrc folders anywhere.
Here's how to do it in OS X:
1) Add REACT_EDITOR=code to your .env.local file
2) Install command code by following Launching from the command line here
3) Restart debugger
4) Profit!
Forgive if this answer doesn't work for android. If you're doing react for web and land here:
You can add
REACT_EDITOR=code
to an .env.local file in your project root if you use create-react-app
https://create-react-app.dev/docs/adding-custom-environment-variables
More info on the .env file pattern: https://create-react-app.dev/docs/adding-custom-environment-variables#what-other-env-files-can-be-used

How to show root folders in file tree in cloud9 local ssh install

I've installed cloud9 locally on my remote sever following instructions from Cloud9's "sdkcore" repository on github.
I was able to activate it correctly.
However, once started, the files tree only shows Cloud9 folders, but if you want to edit a file contained in a /var/www/examplefolder directory, I cannot.
I could only modify through the ssh terminal, but I would like to be able to edit the files using the most convenient sublime editor.
How can i fix it?
Thanks.
update:
I resolved creating a link with the command :
sudo ln -s /path/from/folder/you/need /path/to/c9/workspace
in that way you will see your files in c9 workspace folder in the file tree bar;
or
sudo ln -s /path/from/folder/you/need /home/yourusername/
in that way you will see your files in favourites folder in the file tree bar.
If you want to do this, you'll need to create the SSH workspace with the workspace root as / . Alternately, you can open files in the IDE by using the c9 {filename} command.

installation directory of appium in mac

I have installed appium-1.5.1 from MAC terminal. The installation is ok but I need the path where it is installed for some reason. Can anyone please tell me where is the installation directory in?
If you installed the GUI appium app (the app whose icon you can click in your Mac's Launchpad), then as orde suggested earlier, just see /Applications/Appium.app
But if you say you installed appium via your terminal, I'm going to take a guess that you installed it using npm. If you installed appium by typing something like npm install -g appium, then all the below is for you:
You can find the appium executable by typing this into your terminal:
which appium
the output of typing this command in your terminal should be something like this (the path may be different for you):
/usr/local/bin/appium
If 'which' gave you a filepath like this, then this path is your appium executable file (the file that is run if you type 'appium' into your terminal).
If you want to find appium's actual installed files, then take the path you just got above, and run the following command, replacing my path with yours:
ls -l /usr/local/bin/appium
the result of that command will look something like this:
lrwxr-xr-x 1 qamacbook admin 44 Apr 19 11:07 /usr/local/bin/appium -> ../lib/node_modules/appium/build/lib/main.js
the end of this line, after the arrow, is the location of your appium installation relative to the executable file. In my example, the full installation is therefore located at /usr/local/lib/node_modules/appium/
Hope it helps!
You can find it here: /Applications/Appium.app. Just change directory to root from your home directory (i.e. cd /), and you'll see the Applications directory.
Terminal type command 'which appium'
It will locate where appium executable is present.
Access the directory and type 'ls -lrt' command
It will display you the linked path of main.js file.
Copy the path in withAppiumJS(new File("<>"))
https://www.blogger.com/blog/post/edit/3033411347863264315/7244750496917206581

How to use gitbash instead of windows cmd.exe with meteor Release 0.7.0.1-win2

I am getting started with Meteorjs. I'm a windows user so I downloaded the windows installer package Release 0.7.0.1-win2. I use gitbash for my command line interface and can't get it to recognize meteor. I get the error "sh.exe": meteor: command not found". It works fine in windows command line but I prefer gitbash.
How do I get meteor to work with gitbash?
I have the perfect answer for you since I literally just solved the issue myself.
First of all make sure meteor works in the default windows command prompt. Next open git bash and check if the following command works:
cmd //c meteor
This runs the command meteor as if you were in the command prompt.
Next step is to set up an alias in git bash so you don't have to type that out each time.
Open git bash and enter the following:
vim ~/.bashrc
this will open/create the bashrc file in VIM, press i to insert and type the following:
alias meteor="cmd //c meteor"
Save and exit vim by first pressing the Esc key then press the ":" key. Now you should be able to enter commands in VIM. Type "wq" and press enter which will write into your .bashrc file and exit vim.
Almost there! Now that you are back in git bash, all you need to do is point to your .bashrc file by entering the following:
source ~/.bashrc
Now you will be able to run meteor commands straight from git bash! Hope that helped!
Here's the fix:
The problem is because of .bat files not being handled properly by
MinGW
Go to this directory - C:\Users[your username]\AppData\Local\.meteor
You should see a meteor.bat file there. Create a new file called "meteor" (without any extension and ""). Open it with notepad and paste the following:
#!/bin/sh
cmd //c "$0.bat" "$#"
save the file and now run git bash. You should be able to use meteor command in git bash.
Details
To run a *.bat command from MinGW's MSYS shell, you must redirect the execution to cmd.exe, thus:
cmd //c foo.bat [args ...]
The foo.bat command file must be in a directory within $PATH, (or you must specify the full path name ... using slashes, not backslashes unless you use two of them for each path name separator). Also, note the double slash to inform cmd.exe that you are using its /C option, (since it doesn't accept the -c form preferred by the MSYS shell.
If you'd like to make the foo.bat file directly executable from the MSYS shell, you may create a two line Bourne shell wrapper script called simply foo alongside it, (in the same directory as foo.bat), thus:
#!/bin/sh
cmd //c "$0.bat" "$#"
(so in your case, you'd create script file meteor alongside meteor.bat).
In fact, since this wrapper script is entirely generic, provided your file system supports hard file links, (as NTFS does for files on one single disk partition), you may create one wrapper script, and link it to as many command file names as you have *.bat files you'd like to invoke in this manner; (hint: use the MSYS ln command to link the files).
Credits to: Keith Marshall on SO and rakibul on Meteor Forums
It shouldn't be too hard - you just need to make sure that the meteor.bat file is in your executable. Check with echo $PATH from the bash console if it is already there.
For me, the meteor 0.7.0.1-win installer appended meteor's folder to the path automatically. However, you can add it manually with:
export PATH=$PATH:/path/to/user/folder/AppData/Local/.meteor
(On CygWin my user folder is at /cygdrive/c/Users/adam - I'm not sure what the equivalent path would be on git bash).
If you like, append that line to your ~/.profile to make sure meteor gets added to the path when the console opens.
Finally, on Windows the executable file is meteor.bat. I made a symbolic link to the filename meteor, just so I wouldn't have to type the .bat:
cd /path/to/user/folder/AppData/Local/.meteor
ln -s meteor.bat meteor.
Please have a look at the issue https://github.com/sdarnell/meteor/issues/18
I would suggest maybe creating a trivial wrapper script or alias that invokes LaunchMeteor.exe with the original arguments.
After more research on google I see that there isn't an implemented way to do this yet. The guys at meteor are working on it and accepting pull requests if you have a solution. The conclusion I came to is to use Vagrant and virtualbox to set up a ubuntu vm for meteor development. You can find info at this site: http://win.meteor.com/ on how to install virtual machines and provision to work with meteor.

SenchaSDKTools-2.0.0-beta3-windows Command not working

I have installed SenchaSDKTools-2.0.0-beta3-windows on my windows Xp 32-bit.
following is the command I am running on command prompt.
C:\Program Files\SenchaSDKTools-2.0.0-beta3>sencha app create MyApp c:\xampp\htdocs\sencha\myapp\
Giving following error
[ERROR] the current workind directory (C:\Program
Files\SenchaSDKTools-2.0.0-beta3>) is not valid SDK directory. Please
'cd' in to a SDK directory before executing this command.
environment variable has been set following way.
Variable name : Path
Value : C:\Program Files\SenchaSDKTools-2.0.0-beta3
can anyone figure out what exactly wrong in this process ?
*****Sencha Touch setup Guide steps(in Window)******
Download Sencha Touch SDK Tool. (http://www.sencha.com/products/touch/download/ -->SDK Tools Beta for Developers). Run .exe file. It will install tool to default path. (i.e. C:\Program Files\SenchaSDKTools-2.0.0-beta3)
Download Sencha Touch SDK. (Download openSource version file licensed under GPL.).
Extract SDK you just download in step 2.
Open Command line terminal (start->Run->type cmd). Change directory path to SDK path as you just extracted in step3.
Verify that Sencha Command is working properly on your machine. So Type Sencha.
E.g. sdkPath>sencha
you will see "Sencha Command v2.0.2" message with other sencha command detail.
Create app in your web directory by typing following.
E.g. sdkpath> sencha app create firstSenchaApp "path/ to/ www"
(If you have tomcat 7 installed in your computer, give path to \apache-tomcat-7.0.30-windows-x86\apache-tomcat-7.0.30\webapps)
Note: There must not be space in directory path name. _(underscore),- (desk) are allowed.
If app is not generated in step 6. There might be an error. There are as follow:
If error message appear is "sencha' is not recognized as an internal or external command, operable program or batch file.”, follow these steps to troubleshoot:
The path to SDK Tools directory is prepended to your system's PATH environment variable.
From the terminal, run
echo $PATH or echo %PATH% .
The SDK Tools directory should be displayed in part of the output. If this is not the case, add it to your PATH manually.
The environment variable SENCHA_SDK_TOOLS_{version} is set, with the value being the absolute path to the installation directory mentioned above.
For example: If the installed version is '2.0.0-beta2', a SENCHA_SDK_TOOLS_2_0_0_BETA2 must be set.
From the terminal, run
echo $SENCHA_SDK_TOOLS_2_0_0_BETA2 or echo %SENCHA_SDK_TOOLS_2_0_0_BETA2% on Windows.
If the output is empty, set the environment variable manually.
Wrong Current Working Directory
A common mistake is not running Sencha Command within either a valid SDK directory or an application directory. If the current directory is not a SDK or application directory, "sencha" command will fallback to backwards-compatible mode. As of SDK Tools release "2.0.0-beta2", you should see a clear warning in such case:
"The current working directory (...) is not a recognized Sencha SDK or application folder. Running in backwards compatible mode." So in this case follow proper step as mentioned above.
Reference:
http://www.sencha.com/forum/showthread.php?192169-Important-SDK-Tools-Sencha-Command-Update
There is an invisible file that you need to copy, called .senchasdk. Make sure it is in the folder.
I think you're having the same problem I had; I had attempted to run 'sencha app create...' from the folder containing sencha.bat. Instead, you need to run 'sencha app create...' from the sencha-touch-2.0.1.1 folder (which contains the .senchasdk file).
See this previous SO question!
Save my days.
By the way, if you can't extract the sencha-cmd to sdk tools, try to extract on other location and copy the folder [3.0.0.250] to your sdk tools > [bin] folder.
hope this helps.