[英]What happen if i use ruby version 2.5.1 with rails version 2.3.18?
[英]What version of Ruby should I use with Rails 2.3.3?
我相信這是RoR的官方網站,所以我可能會聽從他們的建議 :
我們建議將Ruby 1.8.7與Rails一起使用。
我認為Rails 2.3.3已經過測試,可以與ruby 1.9.1一起使用。 但是,您很可能會遇到一些其他庫的問題。
實際上,您可以在此站點上查看人們對ruby 1.9的評價以及不同的gem / plugins- http://isitruby19.com/
一些Rails插件在Ruby 1.9上不起作用。 如果您想使用Ruby 1.9,那么不妨使用Rails3。我已經嘗試將Rails 3與Ruby 1.9一起使用 ,並且效果很好。
我將Ruby 1.9.1p129與Rails 2.3.3配合使用,而不是對Net :: HTTP的monkeypatch用於ActiveResource,它似乎足夠穩定,並具有一些不錯的速度優勢。
除非您使用monkeypatch tempfile來使Passenger正常工作,否則最新版本的Ruby 1.9.1不能與Rails一起使用,而Net :: HTTP的monkeypatch似乎足夠安全
module Net
class HTTP < Protocol
alias_method :use_ssl, :use_ssl?
end
end
相比:
--- lib/tempfile.rb 23 Jul 2003 16:37:35 -0000 1.19
+++ lib/tempfile.rb 5 May 2004 23:33:57 -0000
@@ -106,7 +106,10 @@ class Tempfile < SimpleDelegator
# file.
def unlink
# keep this order for thread safeness
- File.unlink(@tmpname) if File.exist?(@tmpname)
+ if File.exist?(@tmpname)
+ closed? or close
+ File.unlink(@tmpname)
+ end
@@cleanlist.delete(@tmpname) if @@cleanlist
end
alias delete unlink
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.