【问题标题】:How to only require sinatra/base using Bundler?如何使用 Bundler 只需要 sinatra/base?
【发布时间】:2013-04-25 03:02:23
【问题描述】:

我只需要sinatra/base,但我不知道如何使用bundler。因为在Gemfile 中我不能给它'sinatra/base',而是给它命名为sinatra

有什么想法吗?

【问题讨论】:

    标签: bundler


    【解决方案1】:

    在您的 Gemfile 中使用以下语法:

     gem "sinatra", "X.Y.Z", :require => "sinatra/base"
    

    然后您可以使用 #require 方法通过捆绑程序要求它:

    Bundler.require :default
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-13
      • 2011-04-28
      • 2011-03-26
      • 2013-01-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多