Ruby Gems / Gemfile:没有这样的文件要加载 - juggernaut

时间:2011-12-09 22:29:39

标签: ruby rubygems gem irb gemfile

我遇到过其他人之前遇到过的问题,但我找不到我在网上找到的答案。当我这样做时:

require "juggernaut" 

在IRB中或当我用

执行Ruby文件时
ruby test.rb

我得到了

no such file to load -- juggernaut

解决方案是将juggernaut添加到我的Gemfile中,对吗?

但Redmont中这个神奇的Gemfile在哪里?它不是Rakefile的所在。也许我必须从头开始创建一个全新的Gemfile?那会是什么样子?

“捆绑者”如何参与其中?

谢谢你们!

1 个答案:

答案 0 :(得分:0)

是的,您需要创建Gemfile。 Bundler会乐意为你做这件事:

$ bundle init
Writing new Gemfile to /foo/bar/Gemfile

$ cat Gemfile
# A sample Gemfile
source "http://rubygems.org"

# gem "rails"