开发者

Going into any Rails project folder, is there a reliable way to tell which version of Rails it is using and created with?

that is, 开发者_Go百科to tell the current Rails version it should use, and also to find out what version of Rails started this project.


For Rails 2 you can go to config/environment.rb and look for RAILS_GEM_VERSION definition at the top.

For Rails 3 go to Gemfile and look for gem 'rails'... at the top.

These tells you what version it's using now. But doesn't mean it was created with the same version and there's no way to be sure. It might have been upgraded to a newer version.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜