简体   繁体   English

如何冻结特定(旧)版本的rails?

[英]How do I freeze a specific (older) version of rails?

I have many versions of rails installed on my system (of 2 & 3) but I want to put version 2.3.11 in the vendor folder ... 我的系统上安装了许多版本的rails(分别为2和3),但是我想将2.3.11版放到供应商文件夹中...

rake rails:freeze:edge RELEASE=2.3.11 耙轨:冻结:边缘RELEASE = 2.3.11

tries to connect to http://dev.rubyonrails.org/archives/rails_2.3.11.zip 尝试连接到http://dev.rubyonrails.org/archives/rails_2.3.11.zip

and times out, is there another way? 超时,还有其他方法吗?

If you just want to use a specific version of rails you can go to the applications gemfile and replace the rails gem with the gem desired.eg 如果您只想使用特定版本的rails,则可以转到应用程序gemfile并用所需的gem替换rails gem。例如

gem 'rails', '3.0.7'

to

gem 'rails', '2.3.11'

then run bundle install as for the vendor folder you might try 然后针对您可能尝试的供应商文件夹运行捆绑安装

gem install rake --install-dir /rails_dir/vendor/gems

to create a gem repository for your vendor directory. 为您的供应商目录创建一个gem存储库。 If neither of these work you might be looking for a gem freeze in which case try http://gemsonrails.rubyforge.org/ . 如果上述两项都不起作用,则可能需要冻结宝石,在这种情况下,请尝试http://gemsonrails.rubyforge.org/ Hope this helps. 希望这可以帮助。

I maintain an older app and have to do this occasionally. 我维护了一个较旧的应用程序,偶尔需要这样做。 The easiest way I've found is to install the gem locally to your system and then use: 我发现最简单的方法是将gem本地安装到系统中,然后使用:

rake rails:freeze:gems RELEASE=2.3.11

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将现有的旧rails项目更新为更新版本 - How do I update an existing older rails project to a newer version 如何将特定的gem冻结到Rails 3应用程序中? - How do I freeze a specific gem into a Rails 3 application? 如何使用 rbenv 安装旧版本的 Rails? 为什么安装版本 5.2.3 后缺少 rails 命令? - How do I install an older version of Rails with rbenv? Why is the rails command missing after installed version 5.2.3? 如何将Gems冻结到Rails 3应用程序中? - How do I freeze gems into a Rails 3 application? 如何将Rails旧版本更新为新版本 - How can I update rails older version to new version 如何切换到旧版本的 rails - How to switch to an older version of rails 如何切换到旧版本的ruby / rails环境? - How do I switch to older versions of the ruby/rails environment? 我是否只需要运行一个旧版应用程序(其他问题)就需要还原到旧版本的Rails? - Do I need to revert to an older version of Rails just to run a single legacy app (among other problems)? Rails 5:我如何找出哪个 Gem 取决于特定的 Ruby 版本? - Rails 5: How Do I Find Out Which Gem Depends on a Specific Ruby Version? 如何安装我想要的旧“ jquery-rails” gem版本? — $(…).live()不起作用 - How to install an older “jquery-rails” gem version that I want ? — $(…).live() not working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM