I use git bash on a windows 10 machine through Windows Terminal. The command 'env' works perfectly every time I start up a session in git bash. However, if I try to do any 'export' command, running any 'env' command after that will raise the error 'bash: env: command not found'. If I close my session and start another one, 'env' works perfectly again. Why is this happening?
I've tried all permutations of the 'env' command, but nothing works. The 'export' command always works, which I know because I tested it to see if it does indeed modify my PATH.
Note: I'm not sure what relevant system info would be helpful to include here, so please tell me what you'd need to solve this issue, but I'd prefer to include as little as possible for privacy.
I am getting the following error while running my rails app in Ubuntu server
FATAL: Listen error: unable to monitor directories for changes. Visit
https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers
for info on how to fix this.
I have followed the above GitHub page, but I was unable to write in max_user_watches which were set in 8192 and I want to set that to 524288.
in cat /proc/sys/fs/inotify/max_user_watches the file was in only read mode.I tried to grant write permissions, but I was getting permission denied error even with root access.
Thanks in Advance!!!
1000 is way too small, try with 524288 as explained in the wiki page: https://github.com/guard/listen/blob/master/README.md#increasing-the-amount-of-inotify-watchers
Listen uses inotify by default on Linux to monitor directories for
changes. It's not uncommon to encounter a system limit on the number
of files you can monitor. For example, Ubuntu Lucid's (64bit) inotify
limit is set to 8192.
and
If you are running Debian, RedHat, or another similar Linux
distribution, run the following in a terminal:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
If you are running ArchLinux, run the following command instead
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system
Just try to execute this from your console
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Hope this will work for you .
References: click here
For others who may have this issue. I had a VM disconnect which left the previous rails server running. Running below resolved the issue without needing to up the number of watcher.
kill -9 $(lsof -i tcp:3000 -t)
In my case, I just need to turn off the terminal and then start it back again. It works when I try to run rails c command :)
Deleting Gemfile.lock and running 'bundle' in the project directory terminal worked for me.
This error occurred for me as I had a number of ruby processes currently running that I was unaware of. Just need to terminate them and all is good
I had this issue during development while running rake (even with rake -h), and the solution from https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers did not work, neither did killing the running ruby processes, killing the terminal or even restarting the computer.
To avoid this error I did a new and clean clone of my project and then rake was working (maybe git clean -fdx could have worked but I did not try it).
I was running rake version 13.0.3, rails 6.1.1, ruby 2.7.2p137.
Adding to #mayur-shah's answer,
It worked for me after closing the server and console. So, if you are running rails server/console, close that first.
Im trying to create cronjob like this to prevent duplicate cronjobs from running:
flock -n /mydir/control.txt -c bash /mydir/script.sh
But its not working.
When i try command in console:
flock -n /mydir/control.txt
I get error:
flock: bad number: /mydir/control.txt
I was browsing web to find answer for my problems but i didnt find anything. What cause this error? How can i fix this?
Btw i use Debian 7 64bit
I'm building docker images from Dockerfile and when I run a script(CUDA installation script) which has
echo XXX > /dev/tty
in it, then an error "/dev/tty: No such device or address" comes up and the build failed.
I've tried --silent flag but it seems do no help.
My base image is Cent OS 7.
Is there anyway to fix or work around this?
I've fixed this problem: it turns out I didn't install command tar & perl before hand.
And the script wants to write error messages to /dev/tty.
The error information led me to the wrong way to solve this issue.
Thanks.
I am trying to run test on physical iPad. I am using appium and webkit-ios-debug-proxy. But ios-webkit-debug-proxy gets disconnected when i try to run tests. It gives an error -
Invalid message _rpc_applicationUpdated: <dict>
<key>WIRApplicationIdentifierKey</key>
<string>PID...</string>
<key>WIRIsApplicationProxyKey</key>
<false/>
<key>WIRApplicationNameKey</key>
...
</dict>
Disconnected
I found some forums, where it was mentioned to run command -
.bin/ios-webkit-debug-proxy-launcher.js -c UDID -d
from the appium folder, but when I run the command, I get an error -
"module.js: ..throw err Error: Cannot find module
'underscore' at Function.Module_resolveFuleName (module.js:336:15) ....
So that solution does not work for me either.
The command above in the question [.bin/ios-webkit-debug-proxy-launcher.js -c UDID -d ], worked for me eventually.
It wasn't initially working as I was downloading ios-webkit-debug-proxy-launcher.js again from github instead of looking for the .js file in current installation, and also, I guess some ports where not freed from the previous ios_webkit_debug_proxy run. Hence it was throwing an error. In most cases the installation on mac, it should be on /use/local/lib/..
Also, to find and kill existing instances, this worked for me -
ps aux | grep portNumber
OR
ps -efl | grep ios_webkit_debug_proxy
and then
kill -9 PID