gpt4 book ai didi

ruby - 如何创建 Gemfile?

转载 作者:数据小太阳 更新时间:2023-10-29 06:21:33 50 4
gpt4 key购买 nike

我是 Ruby 的新手。

我正在关注一篇博文,其中说为了安装所需的依赖项,我需要创建一个 Gemfile。

如何创建一个以 rspec 作为依赖项的 Gemfile?

最佳答案

bundle init在当前工作目录中生成一个 Gemfile。

$ bundle init
Writing new Gemfile to /app/Gemfile

$ cat Gemfile
# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# gem "rails"

关于ruby - 如何创建 Gemfile?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30358612/

50 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com