[英]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.