Forum: Ruby on Rails Rake: How to determine the Rails version?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Joshua M. (Guest)
on 2006-05-18 17:24
Hi all

I'm learning to use Rake for migration etc.
I wonder if there's a way to determine the currently used Rails version,
so e.g. when installing a new engine using Rake I could check if there's
a version used that's older as needed and so abort the installation. You
know what I mean? ;-)

Thanks and greetings,
Joshua
Thibaut B. (Guest)
on 2006-05-18 17:34
(Received via mailing list)
Hi Joshua

script/about will give you the rails version (guess there's probably a
way
to retrieve that programmatically).

hth

Thibaut
Tom W. (Guest)
on 2006-05-18 17:44
(Received via mailing list)
Rails::VERSION::MAJOR
Rails::VERSION::MINOR
Rails::VERSION::TINY

Or for all three as a string:

Rails::VERSION::STRING

Tom
This topic is locked and can not be replied to.