Forum: Ruby on Rails how to get version of installed rails

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.
Christian R. (Guest)
on 2007-01-18 18:17
hi guys,

how do i get the version of installed rails?

best regards
chris
Faisal N Jawdat (Guest)
on 2007-01-18 18:22
(Received via mailing list)
On Jan 18, 2007, at 11:17 AM, Christian R. wrote:
> how do i get the version of installed rails?

The most accurate way is probably to do a "gem list | grep rails".

"rails -v" will give you the version rails reports, but can be
misleading for test versions (e.g. this will report 1.1.6 for the 1.2
release candidates, whereas "gem list" will tell you 1.1.6.5848).

-faisal
Christian R. (Guest)
on 2007-01-18 18:36
Faisal N Jawdat wrote:
> On Jan 18, 2007, at 11:17 AM, Christian R. wrote:
>> how do i get the version of installed rails?
>
> The most accurate way is probably to do a "gem list | grep rails".
>
> "rails -v" will give you the version rails reports, but can be
> misleading for test versions (e.g. this will report 1.1.6 for the 1.2
> release candidates, whereas "gem list" will tell you 1.1.6.5848).
>
> -faisal
 thank very much faisal
Bojan M. (Guest)
on 2007-01-19 16:23
(Received via mailing list)
Christian R. wrote:
>
> hi guys,
>
> how do i get the version of installed rails?
>
> best regards
> chris
>

you can also use:

ruby script/runner "puts Rails::VERSION::STRING"

from rails project directory to find out on what version of Rails would
project run.

best regards,
Bojan M.
--
Bojan M.
Informatika Mihelac, Bojan M. s.p.  |  www.informatikamihelac.com
-> tools, scripts, tricks from our code lab: http://source.mihelac.org
This topic is locked and can not be replied to.