gpt4 book ai didi

ruby-on-rails - 如何在 Rails 3 中安装 authlogic?

转载 作者:行者123 更新时间:2023-12-04 22:51:46 25 4
gpt4 key购买 nike

我发现 config/environment.rb 文件在 Rails 3.0 版中看起来有所不同。
此外,当我添加行“config.gem”authlogic“.To environment.rb 文件

最佳答案

对于 Rails 3,您不再编辑 config/environment.rb .您编辑 Gemfile , 添加

gem 'authlogic'

到它,然后做一个
bundle install

更多信息: http://gembundler.com/rails3.html

会有 Gemfile.lock ,它会列出您项目中的所有 gem 及其版本。 Bundler 的文档:

Whenever your Gemfile.lock changes, always check it in to version control. It keeps a history of the exact versions of all third-party code that you used to successfully run your application.

When your co-developers (or you on another machine) check out your code, it will come with the exact versions of all the third-party code your application used on the machine that you last developed on (in the Gemfile.lock). When they run bundle install, bundler will find the Gemfile.lock and skip the dependency resolution step. Instead, it will install all of the same gems that you used on the original machine.

关于ruby-on-rails - 如何在 Rails 3 中安装 authlogic?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3952603/

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