【问题标题】:Why is this gemfile not working为什么这个 gemfile 不工作
【发布时间】:2016-02-01 05:11:30
【问题描述】:

更新: 现在我已经安装了 RedCloth 的所有依赖项,当我运行旧的 gemfile 时,它​​说我需要使用早期版本的 bundler 来运行它 1.0.10 而不是 1.11.2,这是我需要的 RedCloth 版本。这是我的一些错误

这是文件

source 'https://rubygems.org'

gem install Redcloth -v '4.2.9'

这给了我这个错误

[!] There was an error parsing `Gemfile`: compile error - syntax error, unexpected tSTRING_BEG, expecting kDO or '{' or '('
gem install Redcloth -v '4.2.9'
                         ^. Bundler cannot continue.

 #  from /Users/adamalloy/adamralloy.github.io/Gemfile:2
 #  -------------------------------------------
 #  source 'https://rubygems.org'
   gem install Redcloth -v '4.2.9'
 #  -------------------------------------------

我应该如何格式化?让我感到困惑的是,我没有收到来自

的错误
source 'https://rubygems.org'
gem 'github-pages'

这是我应该运行的设置 jekyll。 bundler 会安装 gem 一段时间,但在需要安装 Redcloth 时遇到错误。这是我第一次使用 ruby​​,所以我很困惑。

【问题讨论】:

    标签: rubygems jekyll


    【解决方案1】:

    您的Gemfile 应如下所示:

    source 'https://rubygems.org'
    
    gem 'redcloth', '4.2.9'
    

    你不应该在你的Gemfile 中写gem install Redcloth -v '4.2.9'。您可以从终端执行此操作。

    【讨论】:

      猜你喜欢
      • 2018-03-13
      • 2023-03-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多