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.
Cb816e71c90750565675cf63233d4db1?d=identicon&s=25 Christian Rolle (chrishawaii)
on 2007-01-18 17:17
hi guys,

how do i get the version of installed rails?

best regards
chris
0ab6a5abab167b409f58d280dc59a229?d=identicon&s=25 Faisal N Jawdat (Guest)
on 2007-01-18 17:22
(Received via mailing list)
On Jan 18, 2007, at 11:17 AM, Christian Rolle 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
Cb816e71c90750565675cf63233d4db1?d=identicon&s=25 Christian Rolle (chrishawaii)
on 2007-01-18 17:36
Faisal N Jawdat wrote:
> On Jan 18, 2007, at 11:17 AM, Christian Rolle 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
866edcb271e88be4bfd935eea7947730?d=identicon&s=25 Bojan Mihelac (Guest)
on 2007-01-19 15:23
(Received via mailing list)
Christian Rolle 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 Mihelac
--
Bojan Mihelac
Informatika Mihelac, Bojan Mihelac 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.