开发者

How do you tell the Rails version inside of a Rails app?

开发者 https://www.devze.com 2023-01-14 15:35 出处:网络
Up to R开发者_高级运维ails 2.3.8, there is a constant: RAILS_GEM_VERSION\"2.3.8\" but Rails 3.0.0 doesn\'t have it.Is there other ways?Use Rails.version.

Up to R开发者_高级运维ails 2.3.8, there is a constant:

RAILS_GEM_VERSION   "2.3.8"

but Rails 3.0.0 doesn't have it. Is there other ways?


Use Rails.version.

Most environment information that you might need from Rails should be accessible from that class.

The documentation.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号