[英]Is there any way to tell which gems and plugins are loaded at runtime for a Rails process?
[英]Going into any Rails project folder, is there a reliable way to tell which version of Rails it is using and created with?
也就是说,告诉它当前应该使用的Rails版本,并找出开始该项目的Rails版本。
对于Rails 2,您可以转到config/environment.rb
并在顶部查找RAILS_GEM_VERSION
定义。
对于Rails 3,请转到Gemfile,然后在顶部查找gem'rails gem 'rails'...
这些告诉您现在正在使用什么版本。 但这并不意味着它是使用相同的版本创建的,因此无法确定。 它可能已升级到新版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.