简体   繁体   English

/usr/bin/jekyll: 没有那个文件或目录

[英]/usr/bin/jekyll: No such file or directory

I am having troubles with jekyll.我在使用 jekyll 时遇到了麻烦。 I have Ubuntu 14.04.我有 Ubuntu 14.04。 I've tried to deploy a static site with rack-jekyll and I ended up messing up with my ruby and jekyll installation files.我尝试使用 rack-jekyll 部署一个静态站点,但最终弄乱了我的 ruby​​ 和 jekyll 安装文件。

I've already made ruby work just fine (I used rbenv to install version 2.2.3) but I still have problems with jekyll.我已经让 ruby​​ 工作得很好(我使用 rbenv 安装了 2.2.3 版)但是我仍然有 jekyll 的问题。 When I type jekyll new smth or jekyll serve it shows:当我输入jekyll new smthjekyll serve它显示:

bash: /usr/bin/jekyll: No such file or directory bash: /usr/bin/jekyll: 没有那个文件或目录

I have already installed jekyll but it still shows that.我已经安装了 jekyll 但它仍然显示。 From what I searched it might be a problem with some path.从我搜索的内容来看,某些路径可能存在问题。

Here are some information that might help to find a solution:以下是一些可能有助于找到解决方案的信息:

rafael@rafael-K56CM:~$ which jekyll
/home/rafael/.rbenv/shims/jekyll
rafael@rafael-K56CM:~$ sudo find / -name jekyll
[sudo] password for rafael: 
/home/rafael/.rbenv/shims/jekyll
/home/rafael/.rbenv/versions/2.2.3/bin/jekyll
/home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/bin/jekyll
/home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll
/home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-coffeescript-1.0.1/lib/jekyll
/home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-sass-converter-1.3.0/lib/jekyll
/home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-watch-1.2.1/lib/jekyll
rafael@rafael-K56CM:~$ gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 2.4.8
  - RUBY VERSION: 2.2.3 (2015-08-18 patchlevel 173) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0
  - RUBY EXECUTABLE: /home/rafael/.rbenv/versions/2.2.3/bin/ruby
  - EXECUTABLE DIRECTORY: /home/rafael/.rbenv/versions/2.2.3/bin
  - SPEC CACHE DIRECTORY: /home/rafael/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /home/rafael/.rbenv/versions/2.2.3/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0
     - /home/rafael/.gem/ruby/2.2.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["https://rubygems.org/", "http://rubygems.org/"]
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:
     - https://rubygems.org/
     - http://rubygems.org/
  - SHELL PATH:
     - /home/rafael/.rbenv/versions/2.2.3/bin
     - /usr/lib/rbenv/libexec
     - /home/rafael/.rbenv/shims
     - /home/rafael/.rbenv/bin
     - /home/rafael/.rbenv/shims
     - /home/rafael/.rbenv/bin
     - /usr/local/heroku/bin
     - /home/rafael/.rbenv/plugins/ruby-build/bin
     - /home/rafael/.rbenv/shims
     - /home/rafael/.rbenv/bin
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin
     - /usr/games
     - /usr/local/games
     - /home/rafael/.rvm/bin
     - /home/rafael/.rvm/bin

This issue can be solved by creating a symbolic link to the jekyll executable:这个问题可以通过创建一个指向jekyll可执行文件的符号链接来解决:

sudo ln -s /path/to/project/gems/bin/jekyll /usr/bin/jekyll

Use the which command to identify where the jekyll executable is installed.使用which命令来确定jekyll可执行文件的安装位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 / usr / bin / env:ruby:没有这样的文件或目录 - /usr/bin/env: ruby: No such file or directory usr / bin / env:'bash':没有这样的文件目录 - usr/bin/env: 'bash': no such file directory /usr/bin/ruby: 错误的解释器:没有那个文件或目录 - /usr/bin/ruby: bad interpreter: No such file or directory bash:/ usr / bin / ruby​​:没有这样的文件或目录 - bash: /usr/bin/ruby: No such file or directory ruby:usr / bin / environment ruby​​没有这样的文件或目录 - ruby: usr/bin/environment ruby no such file or directory Rails capistrano /usr/bin/env 没有文件或这样的目录 - Rails capistrano /usr/bin/env no file or such directory -bash:/ usr / local / bin / heroku:/ usr / local / bin / ruby​​:bad interpreter:没有这样的文件或目录 - -bash: /usr/local/bin/heroku: /usr/local/bin/ruby: bad interpreter: No such file or directory zsh:/ usr / bin / bundle:错误的解释器:/ usr / bin / ruby​​:没有这样的文件或目录 - zsh: /usr/bin/bundle: bad interpreter: /usr/bin/ruby: no such file or directory Heroku - / usr / bin / env:ruby1.9.1:没有这样的文件或目录 - Heroku - /usr/bin/env: ruby1.9.1: No such file or directory ruby on rails“usr / bin / env:'ruby2.3':没有这样的文件或目录” - ruby on rails “usr/bin/env: ‘ruby2.3’: No such file or directory”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM