- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试学习 Jekyll,如果我输入以下命令
rake post title="Hello World"
我收到以下错误:
rake post title="My First Post"
/usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:296:in `to_specs': Could not find 'rake' (>= 0) among 11 total gem(s) (Gem::LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:307:in `to_spec'
from /usr/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /usr/bin/rake:18
这是我的环境:
gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.3
- RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib64/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib64/ruby/gems/1.8
- /home/jsmith/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
最佳答案
首先,为了简化事情,您的 Jekyll 应用程序应该使用 bundler*。 cd
到您的应用并运行:
$ bundle init
这将创建一个 Gemfile。在那个 Gemfile 中添加 jekyll:
# Gemfile
source 'https://rubygems.org'
gem 'jekyll'
然后运行 bundle install
,这将安装 jekyll 及其所有依赖项:
$ bundle install
然后预先用bundle exec
运行rake,如下所示:
$ bundle exec rake post title="Hello World"
这样做是使用添加到 Gemfile(与您当前项目关联的 gem 列表)的 rake 版本。
* 取自 http://matthodan.com/2012/10/27/how-to-create-a-blog-with-jekyll.html 的说明
关于ruby-on-rails - 尝试使用 Jekyll rake 命令时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15573153/
bundle exec jekyll serve Traceback (most recent call last): 4: from /Users/Suwan_Long/.rvm/gems/
我对 jekyll 之间的关系感到困惑和 jekyll bootstrap .我想创建一个博客,但我不确定要使用哪个网站来提供教程等等。 最佳答案 Jekyll 是主要的东西。它是将您的 Markdo
我正在重写我的博客以使用 Jekyll。 Jekyll 使用 Liquid 模板语言,因此学习如何自定义变得更加困难。 我有很多 .md 文件(markdown),每个帖子一个。对于我在前面的以下内容
在 jekyll 中是否有等同于 laravel 的 @section('') block ?我想做的是创建一个模板,可以压缩多个 jekyll 页面之间共享的 html。例如: 默认布局
我想为我的 jekyll 博客主页上的每篇文章添加一个赞按钮 我没有找到任何插件。我不想要任何连接到公司/产品页面点赞的 Facebook 点赞按钮。 我想要一个独立于任何社交平台且仅与帖子相关的点赞
在我的网站上,会有两种类型的帖子:blog和 portfolio .我希望每个类别都有一个页面,只显示该类别的帖子。 在 Jekyll 中实现这一目标的最佳方法是什么?我已经做了一些功课,但我正在努力
我正在使用 Jekyll。帖子和页面有什么区别?据我所知: 它们都可以包含 YAML 前端内容,以及 一个帖子有一个日期和一个永久链接,但一个页面没有。 还有更多不同吗? 最佳答案 以下是差异 帖子文
我在一个 jekyll 帖子上有以下标题,其中一个作者“usman”生成 this文章。我想要类似“作者:usman,someone_else”这样的同事也可以为这篇文章做出贡献。这可能吗?我将如何设
我看官方文档的时候,只提到了{% highlight python %}语法: https://jekyllrb.com/docs/templates/ 但是我更喜欢使用反引号代码块来突出 Markd
是否可以拥有多语言 jekyll 网站而无需维护单独的 _post 文件? 我知道可以通过 _posts/2014-02-27-post.md 实现它和 _posts/pt/2014-02-27-po
我正在尝试使用 jekyll 来创建网站。我正在使用 jekyll-bootstrap。 默认配置有页面存档,其中所有帖子都按帖子日期的年份和月份分组列出。目前,月份以英文显示。我看过代码,这是一段摘
我正在尝试从我的网站创建帖子的存档页面。我希望能够以这种格式为每个月的帖子列表提供一个页面: www.mywebsite.com/2016/11 将显示 2016 年 11 月的所有帖子。 我可以为我
我正在尝试从我的网站创建帖子的存档页面。我希望能够以这种格式为每个月的帖子列表提供一个页面: www.mywebsite.com/2016/11 将显示 2016 年 11 月的所有帖子。 我可以为我
为了只显示 4 个帖子,我使用了以下代码段: {% for post in site.categories.mycategory limit:4 %} {{ post.content }} {%
我要添加collections到我的 Jekyll 网站。在我的 _config.yml 文件中,我设置了 output: true: collections: faq: output:
目前我在静态网站上工作,所以我使用 jekyll 来生成它。为了拥有漂亮的结构和精美的 URL,我使用永久链接。 permalink: /impressum/ 例如,impressum.html 被呈
我希望我的 Jekyll 站点上的所有帖子和页面都具有相同的链接结构:example.com/my-title ,无论我用来存储文件的目录结构如何。 查看 documentation看来我应该能够通过
有什么办法可以做这样的事情吗? {% if file.basename contains {{basename}} %} 我看到的所有示例都明确使用了一个值,如下所示: {% if file.base
关注 Jekyll Collections documentation ,我在_config.yml中写了如下代码 _config.yml collections: - popular_posts 所
我正在尝试计算和列出 Jekyll 中名为 _note 的集合中的标签。我认为,我非常接近解决它,但我对标签的实际计数有点困惑(列出唯一标签工作正常)并且可以用第二双眼睛查看液体标记看看我错过了什么。
我是一名优秀的程序员,十分优秀!