启动rails服务器时我遇到了这个问题.
红宝石:2.3.1
rails:5.0.0.1
ubuntu 14.04在windows linux子系统中.提前致谢.
/home/devs/.rvm/gems/ruby-2.3.1/gems/rb-inotify-0.9.7/lib/rb-inotify/watcher.rb:74:in `initialize': Invalid argument - Failed to watch "/home/devs/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/locale": the given event mask contains no legal events; or fd is not an inotify file descriptor. (Errno::EINVAL)
from /home/devs/.rvm/gems/ruby-2.3.1/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:190:in `new'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:190:in `watch'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:204:in `watch'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/adapter/linux.rb:32:in `_configure'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/adapter/base.rb:45:in `block in configure'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/adapter/base.rb:40:in `each'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/adapter/base.rb:40:in `configure'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/adapter/base.rb:63:in `start'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/backend.rb:28:in `start'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/listener.rb:67:in `block in <class:Listener>'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/fsm.rb:120:in `instance_eval'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/fsm.rb:120:in `call'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/fsm.rb:91:in `transition_with_callbacks!'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/fsm.rb:57:in `transition'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/listener.rb:90:in …Run Code Online (Sandbox Code Playgroud) 我想运行gcc在bash同C#或C++,所以我可以做一个小的IDE它.我尝试用cmd运行gcc :( - bash gcc --versionversion只是一个例子)但它显示错误:/usr/bin/gcc: /usr/bin/gcc: Can't run the file
所以我想我需要一个特定的命令C#或C++?或者,我可以采用某种运行gcc上bash直接?
我正在从学校开始编程项目,并决定尝试使用Bash for windows.我下载了项目的骨架文件,并将它们粘贴到我的bash主文件夹所在的文件夹中.当我打开终端并进入文件夹时,即使我在正确的文件夹中,它也显示没有任何内容.如何显示文件?
什么是保持Windows 10 Path和'Bash on Ubuntu on Windows(WSL)'路径同步的最佳方法?
我已将Windows 10 Path(将其转换为bash兼容)附加到.bashrc,但bash shell似乎没有将其拾取.
我采取的步骤:
我正在尝试启用自定义构建任务以使用 bash 在 Visual Studio 2017 中构建基于 DocBook 的文档。我在 Windows 10 中使用内置的适用于 Linux 的 Windows 子系统。我可以启动 cmd.exe 并dir按照 MS 的示例运行。但是,我需要make ARGS在 bash 中运行,这就是我失败的地方:
'"bash"' is not recognized as an internal or external command,
operable program or batch file.
Run Code Online (Sandbox Code Playgroud)
我可以交互地运行 cmd.exe 并启动 bash 没有任何问题。但它在 Visual Studio 中失败。VS2017 是否使用了一些特殊的环境?如何让它通过这些任务运行 bash?我想我错过了一些非常简单和微不足道的东西,但我不知道从哪里看。
本质上,我想make all-html针对我的 DocBook 源的路径运行命令。
这是一个最小任务示例:
{
"version": "0.2.1",
"tasks": [
{
"taskName": "Build all-html",
"appliesTo": "*",
"type": "command",
"command": "bash"
}
]
}
Run Code Online (Sandbox Code Playgroud) bash visual-studio windows-10 windows-subsystem-for-linux visual-studio-2017
昨晚Win10对版本1803进行了更新.
从那时起,Visual Studio(2015)就无法再编译任何新的克隆项目了.我通过Windows上的Bash从gitlab服务器克隆.在更新之前已经在磁盘上的旧项目仍然可以编译而无需抱怨.
似乎Visual Studio无法再找到/找到文件,因为尝试编译会产生如下错误消息:
c1xx : fatal error c1083: cannot open source file: ...
Run Code Online (Sandbox Code Playgroud)
有没有人遇到同样的问题或有胶水为什么会发生这种情况?
经过一番挖掘后,它归结为CL.exe编译器似乎不允许读取由git创建的任何子目录的问题.但是,它有权在主 git目录中读取.
事实证明这是Ubuntu子系统的问题.通过WSL创建的目录不能被某些程序(在我们的例子中是CL.exe)读取.
真可惜......在更新WSL和VS之前就像魅力一样!
到目前为止的解决方案:使用git-Bash直到MS修复问题...
git windows-10 visual-studio-2015 windows-subsystem-for-linux
I have been using ConEmu for some time to run 'bash for windows', but all of the sudden it stopped working. When I launch a bash tab it now says:
ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...
Run Code Online (Sandbox Code Playgroud)
I think this means that it launched something, but the shell closed quickly. I haven't changed anything that I can recall with the system, it just started doing that.
Windows version: 10 (build …
我使用的是Windows Subsystem for Linux(WSL),并且安装了microSD卡,过去可以将存储库克隆到其中。但是,最近,当我尝试从中克隆时,我收到此错误/mnt/d/:
Cloning into 'your_repo'...
error: chmod on /mnt/d/your_repo/.git/config.lock failed: Operation not permitted
error: chmod on /mnt/d/your_repo/.git/config.lock failed: Operation not permitted
error: chmod on /mnt/d/your_repo/.git/config.lock failed: Operation not permitted
error: chmod on /mnt/d/your_repo/.git/config.lock failed: Operation not permitted
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
如果我切换到任何目录,/mnt/c/都可以完美克隆。克隆时,如果有帮助,可以使用SSH。谢谢。
我使用 Windows 10 的 Linux 子系统(Windows 10 版本 1803)
我可以使用命令行:
user@laptop:~$ wslpath -w /c/
C:\
Run Code Online (Sandbox Code Playgroud)
但是当我尝试使用
user@laptop:~$ wslpath -w ~
wslpath: /home/user: Result not representable
Run Code Online (Sandbox Code Playgroud)
即使我使用:
user@laptop:~$ wslpath -w /home/user
wslpath: /home/user: Result not representable
Run Code Online (Sandbox Code Playgroud)
为什么?如何将 /home/user 转换为 windows 路径?
我在 Windows 中的主文件夹路径是 C:\Users\winuser\AppData\Local\lxss\home
我希望一些命令行可以让我返回那个字符串。
我使用的是 Windows 10,最近安装了适用于 Linux 的 Windows 子系统。Anaconda 那时已经安装在我的电脑上。
当我尝试在 Windows 上的 Ubuntu 上的 Bash 上运行 conda 命令时,出现以下错误:
$ conda conda: command not found
Run Code Online (Sandbox Code Playgroud)
C:\Users\«user»\Anaconda3\Scripts
C:\Users\«user»\Anaconda3
Run Code Online (Sandbox Code Playgroud)
到 $PATH。但是正如您在下面看到的,两者都已包含在内(我没有手动添加它们):
$ echo $PATH | tr ':' '\n'
...
/mnt/c/Users/«user»/Anaconda3
/mnt/c/Users/«user»/Anaconda3/Scripts
/mnt/c/Users/«user»/Anaconda3/Library/bin
...
Run Code Online (Sandbox Code Playgroud)
以下 conda 文件在 Anaconda3/Scripts 中可用:
conda.exe
conda-env.exe
conda-env-script.py
conda-script.py
conda-server.exe
conda-server-script.py
Run Code Online (Sandbox Code Playgroud)
这些命令在 PowerShell 和 cmd 中都可以正常工作。
我错过了什么?
[编辑]:在上面的 Anaconda3 路径中更正了第二个 URL 并将用户更改为 <用户>。