杰基尔 - 命令未找到 [英] Jekyll - command not found

查看:300
本文介绍了杰基尔 - 命令未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得杰基尔的运行,但我用Ruby没有经验。结果
至于我可以告诉哲基尔安装成功。结果
但是:

I am trying to get Jekyll running but I have no experience with Ruby.
As far as I can tell the installation of Jekyll has succeeded.
However:

$ jekyll

给出了一个错误:

Gives an error:

-bash: jekyll: command not found


这是宝石ENV 结果:

  - RUBYGEMS VERSION: 1.3.4
  - RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0]
  - INSTALLATION DIRECTORY: /Volumes/HDD/DADU/gems
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /Volumes/HDD/DADU/gems/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-10
  - GEM PATHS:
     - /Volumes/HDD/DADU/gems
     - /Volumes/HDD/DADU/.gem/ruby/1.8
     - /Library/Ruby/Gems/1.8
     - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/

和我发现下面的路径通向东西化身:

And I found the following paths leading to "something" Jekyll:


  • 〜.gem /红宝石/ 1.8 /宝石/哲基尔-0.11.0 / lib目录/ jekyll.rb

  • 〜.gem /红宝石/ 1.8 /宝石/斌/杰基尔(执行文件)

  • ~.gem/ruby/1.8/gems/jekyll-0.11.0/lib/jekyll.rb
  • ~.gem/ruby/1.8/gems/bin/jekyll (exec file)

推荐答案

这样做的最简单的方法是使用RVM。它管理Ruby和你所有的宝石,很容易使用。请参阅此链接使用它。

The easiest method of doing this is to use RVM. It manages Ruby and all its gems for you and it's easy to use. See this link for using it.

如果你不想使用,你将需要修改PATH变量,以便它可以找到你的宝石。我发现这是乏味和收归RVM,但这里的一般步骤。

If you did not want to use that you will need to modify your PATH variables so it can find your gems. I have found this to be tedious and reverted to RVM, but here are the general steps.

您将需要找出越来越安装你的宝石在哪里。如果你做了创业板安装... 宝石将在〜/ .gem /红宝石/ 1.8 /宝石/斌如果你使用 sudo的创业板安装... 宝石将在 /System/Library/Frameworks/Ruby.framework/Versions/1.8某处/资源

You will need to find out where your gems are getting installed. If you did gem install ... the gems will be in ~/.gem/ruby/1.8/gems/bin, if you used sudo gem install ... the gems will be somewhere in /System/Library/Frameworks/Ruby.framework/Versions/1.8/Resources

您必须把这个路径添加到PATH变量。要做到这一点最简单的方法是通过运行:
回声'PATH = $ PATH:以上/路径/要/宝石'>>在〜/ .bash_profile

You have to add this path to your PATH variable. Easiest way to do this is by running : echo 'PATH=$PATH:above/path/to/gems' >> ~/.bash_profile

这篇关于杰基尔 - 命令未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆