Forum: Ruby on Rails "Gem::RubyGemsVersion" and gem -v don't match

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.
0c5c4f4374df4882cf83c70715ebd951?d=identicon&s=25 Rred Cat (rredcat)
on 2009-01-14 00:18
Hello,

1) gem -v shows next: "1.3.1"
2) my ruby&rails project has boot.rb file it contains next method
def rubygems_version
        Gem::RubyGemsVersion rescue nil
      end
this method is called in next code:
def load_rubygems
        require 'rubygems'
        min_version = '1.3.1'
        unless rubygems_version >= min_version
          $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you
have #{rubygems_version}). Please `gem update --system` and try again.)
          exit 1
        end

Sometime when I open my project I have a window with next text "Rails
requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update
--system` and try again."

Why Gem::RubyGemsVersion rescue nil gets "1.2.0" when I have "1.3.1"
version?? Any idea?

PS: This trouble doesn't have any affect to work of project, but I
interest how(where) can I fix it?
PSS: start "gem update --system" says "Nothing to update"
PSSS: I'm novice in Ruby so please, expand your answer (:
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-01-14 01:24
(Received via mailing list)
On 13 Jan 2009, at 23:18, Rred Cat wrote:

>
> Hello,

Do you have more than one install of ruby (eg one in /usr/bin, the
other in /usr/local/bin ?)

Fred
0c5c4f4374df4882cf83c70715ebd951?d=identicon&s=25 Rred Cat (rredcat)
on 2009-01-14 08:23
Frederick Cheung wrote:
> On 13 Jan 2009, at 23:18, Rred Cat wrote:
>
>>
>> Hello,
>
> Do you have more than one install of ruby (eg one in /usr/bin, the
> other in /usr/local/bin ?)
>
> Fred

Hello Fred,
I think that was not present.
link (Ruby) and executable (Ruby1.8) was presented in /usr/bin, but
/usr/local/bin is empty.
80e4cb97cae5c8d745f72337d93fd8f2?d=identicon&s=25 MaD (Guest)
on 2009-01-14 08:57
(Received via mailing list)
try installing the gem "rubygems-update" and then call "sudo
update_gems".
Fac81a9d95c81d817a2debb6f717f3ac?d=identicon&s=25 Sazima (Guest)
on 2009-01-14 20:59
(Received via mailing list)
I had something similar, check your installations and paths...

Cheers, Sazima
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-01-14 21:07
(Received via mailing list)
On Jan 14, 7:23 am, Rred Cat <rails-mailing-l...@andreas-s.net> wrote:
> Hello Fred,
> I think that was not present.
> link (Ruby) and executable (Ruby1.8) was presented in /usr/bin, but
> /usr/local/bin is empty.

They could be in other places - those were just examples. Comparing
the output of
which gem
and
which ruby

might be enlightening.

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