Gem Rails Version Showing Wrong?

30 views
Skip to first unread message

Tiago Rossi

unread,
Jan 31, 2015, 12:30:14 AM1/31/15
to rubyonra...@googlegroups.com
Hello, and first of all, Im starting with ruby and Ive installed into my server, sorry for my newbie question here guys.
After install rails when I type rails -v it shows Rails 2.3.18 but after I type gem dependency rails it shows Gem rails-4.2.0 and other dependencies.
Please, what are the real version?
Thanks very much.

Like that:

#rails -v
Rails 2.3.18

# gem dependency rails
Gem rails-4.2.0
...show the dependencies

Sushruth Sivaramakrishnan

unread,
Jan 31, 2015, 2:51:58 AM1/31/15
to rubyonra...@googlegroups.com
It seems you have installed rails version 2.3, but when you run gem dependency rails, it shows the data for the latest release. 
Run gem install rails -v 4.2.0 to get the 4.2.0 version
Correct me if I am wrong.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bb878be5-99e0-4db1-af8d-d009564562d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Colin Law

unread,
Jan 31, 2015, 4:05:51 AM1/31/15
to rubyonra...@googlegroups.com
On 31 January 2015 at 05:30, Tiago Rossi <ti...@boltassessoria.com> wrote:
> Hello, and first of all, Im starting with ruby and Ive installed into my
> server, sorry for my newbie question here guys.
> After install rails when I type rails -v it shows Rails 2.3.18 but after I
> type gem dependency rails it shows Gem rails-4.2.0 and other dependencies.

I presume by that you mean that it shows the dependencies for several
versions of rails. In which case it means you have several versions
of rails installed. Your application will use whichever version you
specify in Gemfile.

rails -v shows you which version is in use.
If you need to manage multiple versions I advise using rvm. Others
like rbenv I believe.

gem list will show you all the versions of gems that are installed.

If you have not already done so then, as you are a beginner with
rails, I suggest working right through a good tutorial such as
railstutorial.org (which is free to use online). That will show you
the basics of rails.

Colin

Tiago Rossi

unread,
Jan 31, 2015, 1:42:01 PM1/31/15
to rubyonra...@googlegroups.com
Thanks for the answer guys, its truth, I have two versions installed, the server has latest version of Cpanel/WHM and it has a script developed by Cpanel to install ruby 1.8.3 ( /scripts/installruby ) that way ruby will appear at the Cpanel from each user and they can manage the apps, if I install any other version I need to manage the apps via command line but I need latest version then I've installed ruby from scratch downloading the latest version from https://www.ruby-lang.org/en/downloads/ 
When I type ruby -v it shows 2.2.0 but at rails it shows 2.3.8. Thanks Very Much to shows me the free online book! It will gonna be a very good reference to me!
I'll uninstall the rails and all dependencies and try to install the latest version and then I'll install rvm.
Best Regards!

Tiago Rossi

Tiago Rossi

unread,
Jan 31, 2015, 1:55:01 PM1/31/15
to rubyonra...@googlegroups.com
Hello again guys, very strange, but today I've checked the rails version and it showed Rails 4.2.0 so I think its fine for now.
Thanks and Best Regards

Tiago Rossi

Colin Law

unread,
Jan 31, 2015, 3:30:43 PM1/31/15
to rubyonra...@googlegroups.com
On 31 January 2015 at 18:42, Tiago Rossi <ti...@boltassessoria.com> wrote:
> Thanks for the answer guys, its truth, I have two versions installed, the
> server has latest version of Cpanel/WHM and it has a script developed by
> Cpanel to install ruby 1.8.3 ( /scripts/installruby ) that way ruby will
> appear at the Cpanel from each user and they can manage the apps, if I
> install any other version I need to manage the apps via command line but I
> need latest version then I've installed ruby from scratch downloading the
> latest version from https://www.ruby-lang.org/en/downloads/
> When I type ruby -v it shows 2.2.0 but at rails it shows 2.3.8. Thanks Very
> Much to shows me the free online book! It will gonna be a very good
> reference to me!
> I'll uninstall the rails and all dependencies and try to install the latest
> version and then I'll install rvm.

Install rvm first, then install rails within rvm. No particular need
to remove anything first unless you need the space.

Colin

> Best Regards!
>
> Tiago Rossi
>
> Em sábado, 31 de janeiro de 2015 07:05:51 UTC-2, Colin Law escreveu:
>>
>> On 31 January 2015 at 05:30, Tiago Rossi <ti...@boltassessoria.com> wrote:
>> > Hello, and first of all, Im starting with ruby and Ive installed into my
>> > server, sorry for my newbie question here guys.
>> > After install rails when I type rails -v it shows Rails 2.3.18 but after
>> > I
>> > type gem dependency rails it shows Gem rails-4.2.0 and other
>> > dependencies.
>>
>> I presume by that you mean that it shows the dependencies for several
>> versions of rails. In which case it means you have several versions
>> of rails installed. Your application will use whichever version you
>> specify in Gemfile.
>>
>> rails -v shows you which version is in use.
>> If you need to manage multiple versions I advise using rvm. Others
>> like rbenv I believe.
>>
>> gem list will show you all the versions of gems that are installed.
>>
>> If you have not already done so then, as you are a beginner with
>> rails, I suggest working right through a good tutorial such as
>> railstutorial.org (which is free to use online). That will show you
>> the basics of rails.
>>
>> Colin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/621f3e54-4869-462f-a750-0b01053c0c80%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages