# Version Hell

**URL:** <https://www.ruby-forum.com/t/version-hell/192408>\
**Category:** Rails\
**Created:** [July 29, 2010, 5:46pm UTC](https://www.ruby-forum.com/t/version-hell/192408 "2010-07-29T17:46:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![disruptivetechnolog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ce7236/32.png) [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Post date:** [July 29, 2010, 5:46pm UTC](https://www.ruby-forum.com/t/version-hell/192408/1 "2010-07-29T17:46:17Z")

</div>

Version hell…I have the latest version of gems installed and gems -v  
proves this, but somewhere an old copy is hanging about - how do I get  
rid of this old version? This is driving me nuts!

I seem to be getting conflicted installations of gems:

For example

$ ruby script/generate model product  
Rails requires RubyGems \>= 1.3.2 (you have 1.2.0). Please `gem update --system` and try again.

brett@ubuntu:~/RoR/Apps/OpenBenefit/depot$ gem update --system  
ERROR: While executing gem … (RuntimeError)  
gem update --system is disabled on Debian. RubyGems can be updated  
using the official Debian repositories by aptitude or apt-get.

brett@ubuntu:~/RoR/Apps/OpenBenefit/depot$ gem -v  
1.3.5

---

<div class="post-metadata">

**Author:** ![disruptivetechnolog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ce7236/32.png) [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Post date:** [July 29, 2010, 5:53pm UTC](https://www.ruby-forum.com/t/version-hell/192408/2 "2010-07-29T17:53:36Z")

</div>

You installed Rubygems using apt-get which is… a very bad idea!  
You should NEVER do this :D.  
Just install rubygems using the source.

Nicolas B.

> **[Médium d'expérience - Nicolas Blanco](https://www.nicolasblanco.fr/)**
>
> Il y a des moments dans la vie où on a tous besoin d’un peu d’aide afin d’apporter des réponses à nos questionnements. Je suis capable de vous aider à trouver votre chemin.

[http://twitter.com/slainer68](http://twitter.com/slainer68)

Dis T. wrote:

> Version hell…I have the latest version of gems installed and gems -v  
> proves this, but somewhere an old copy is hanging about - how do I get  
> rid of this old version? This is driving me nuts!
> 
> I seem to be getting conflicted installations of gems:
> 
> For example
> 
> $ ruby script/generate model product  
> Rails requires RubyGems \>= 1.3.2 (you have 1.2.0). Please `gem update --system` and try again.
> 
> brett@ubuntu:~/RoR/Apps/OpenBenefit/depot$ gem update --system  
> ERROR: While executing gem … (RuntimeError)  
> gem update --system is disabled on Debian. RubyGems can be updated  
> using the official Debian repositories by aptitude or apt-get.
> 
> brett@ubuntu:~/RoR/Apps/OpenBenefit/depot$ gem -v  
> 1.3.5

---

<div class="post-metadata">

**Author:** ![disruptivetechnolog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ce7236/32.png) [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Post date:** [July 29, 2010, 5:54pm UTC](https://www.ruby-forum.com/t/version-hell/192408/3 "2010-07-29T17:54:12Z")

</div>

Did you install anything by mistake in ~/.gem ?

---

<div class="post-metadata">

**Author:** ![disruptivetechnolog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ce7236/32.png) [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Post date:** [July 29, 2010, 5:57pm UTC](https://www.ruby-forum.com/t/version-hell/192408/4 "2010-07-29T17:57:07Z")

</div>

Fernando P. wrote:

> Did you install anything by mistake in ~/.gem ?

yep - that is all deleted now.

---

<div class="post-metadata">

**Author:** ![disruptivetechnolog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ce7236/32.png) [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Post date:** [July 29, 2010, 5:54pm UTC](https://www.ruby-forum.com/t/version-hell/192408/5 "2010-07-29T17:54:32Z")

</div>

On Thu, Jul 29, 2010 at 12:46 PM, Dis T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> $ ruby script/generate model product
> 
> brett@ubuntu:~/RoR/Apps/OpenBenefit/depot$ gem -v  
> 1.3.5  
> The weird thing is gem -v showing 1.3.5  
> However, you can try this on a Debian(-like) environment:  
> sudo gem install rubygems-update #( 1.3.7 should be the latest version)  
> sudo update\_rubygems #if this doesn’t work, try finding the right  
> executable file in your gems path.

That would update your rubygems version.

Hope it helps.

–  
Leonardo M…  
There’s no place like ~

---

<div class="post-metadata">

**Author:** ![disruptivetechnolog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ce7236/32.png) [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Post date:** [July 29, 2010, 6:07pm UTC](https://www.ruby-forum.com/t/version-hell/192408/6 "2010-07-29T18:07:36Z")

</div>

Thanks - I have now update the version.That seems to have done the  
trick!

Thanks!

Leonardo M. wrote:

> On Thu, Jul 29, 2010 at 12:46 PM, Dis T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > $ ruby script/generate model product
> > 
> > brett@ubuntu:~/RoR/Apps/OpenBenefit/depot$ gem -v  
> > 1.3.5  
> > The weird thing is gem -v showing 1.3.5  
> > However, you can try this on a Debian(-like) environment:  
> > sudo gem install rubygems-update #( 1.3.7 should be the latest version)  
> > sudo update\_rubygems #if this doesn’t work, try finding the right  
> > executable file in your gems path.
> 
> That would update your rubygems version.
> 
> Hope it helps.
> 
> –  
> Leonardo M…  
> There’s no place like ~

---

<div class="post-metadata">

**Author:** ![disruptivetechnolog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ce7236/32.png) [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Post date:** [July 29, 2010, 6:11pm UTC](https://www.ruby-forum.com/t/version-hell/192408/7 "2010-07-29T18:11:17Z")

</div>

Now need to get MySQL installed. I am having the following trouble  
installing

sudo gem install mysql – --with-mysql-config=/usr/bin/mysql\_config

ERROR: Error installing mysql:  
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb --with-mysql-config=/usr/bin/mysql\_config  
extconf.rb:10:in `require’: no such file to load – mkmf (LoadError)  
from extconf.rb:10

Gem files will remain installed in  
/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.  
Results logged to  
/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql\_api/gem\_make.out

Any ideas?

Dis T. wrote:

> Thanks - I have now update the version.That seems to have done the  
> trick!
> 
> Thanks!
> 
> Leonardo M. wrote:
> 
> > On Thu, Jul 29, 2010 at 12:46 PM, Dis T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > 
> > > $ ruby script/generate model product
> > > 
> > > brett@ubuntu:~/RoR/Apps/OpenBenefit/depot$ gem -v  
> > > 1.3.5  
> > > The weird thing is gem -v showing 1.3.5  
> > > However, you can try this on a Debian(-like) environment:  
> > > sudo gem install rubygems-update #( 1.3.7 should be the latest version)  
> > > sudo update\_rubygems #if this doesn’t work, try finding the right  
> > > executable file in your gems path.
> > 
> > That would update your rubygems version.
> > 
> > Hope it helps.
> > 
> > –  
> > Leonardo M…  
> > There’s no place like ~

---

<div class="post-metadata">

**Author:** ![disruptivetechnolog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ce7236/32.png) [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Post date:** [July 29, 2010, 6:16pm UTC](https://www.ruby-forum.com/t/version-hell/192408/8 "2010-07-29T18:16:12Z")

</div>

mysql\_config exists and mysql is up and running! No idea why this  
sometimes works and sometimes breaks. Before I managed this fine. Now  
its not working and I cannot re-install the mysql gems!

---

<div class="post-metadata">

**Author:** ![disruptivetechnolog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ce7236/32.png) [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Post date:** [July 29, 2010, 6:26pm UTC](https://www.ruby-forum.com/t/version-hell/192408/9 "2010-07-29T18:26:44Z")

</div>

On Jul 29, 5:16 pm, Dis T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> mysql\_config exists and mysql is up and running! No idea why this  
> sometimes works and sometimes breaks. Before I managed this fine. Now  
> its not working and I cannot re-install the mysql gems!

it’s saying that you’re missing mkmf, which is part of the ruby  
standard library. Looks like this is part of the ruby-dev package on  
debian/ubuntu machines.

Fred
