如何将 gems 冻结到 Rails 3 应用程序中? [英] How do I freeze gems into a Rails 3 application?

查看:26
本文介绍了如何将 gems 冻结到 Rails 3 应用程序中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将特定的 gem 冻结到我的 Rails 应用程序中.

I want to freeze a specific gem into my Rails application.

在 rails 2 中有这个命令:

In rails 2 there was this command:

rake gems:unpack

我在 Rails 3 中找不到那个命令.

I can't find that command in Rails 3.

推荐答案

我还没有这样做,但我相信这一切都由 bundler 处理.

I haven't had to do this yet, but I believe it's all handled by bundler.

当您创建新的 rails3 应用程序时,rails 依赖项会放入您的 Gemfile.您可以运行 bundle install 来安装它们.默认情况下,它们安装在您的 BUNDLE_PATH 中.

When you create a new rails3 app, the rails dependencies are put into your Gemfile. You can run bundle install to install them. By default, they are installed into your BUNDLE_PATH.

如果您想在您的应用中安装它们,您可以指定位置:bundle install vendor/gems.

If you want to install them within your app, you can specify where: bundle install vendor/gems.

这篇关于如何将 gems 冻结到 Rails 3 应用程序中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆