ERROR: could not find gem mysql locally or in a repository

Beim installieren des rubygems mysql trat bei mir auf meinem debian system heute folgendes auf:


debian:~# gem install mysql
ERROR: could not find gem mysql locally or in a repository

Da ich doch ein weilchen gebraucht habe, und Online keine Lösung dazu fand - will ich euch die Lösung nicht vorenthalten! :)

Erst dachte ich mir ... such ich halt einmal danach:

debian:~# gem search --remote mysql

*** REMOTE GEMS ***

ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Moved Permanently 301 (http://gems.rubyforge.org/latest_specs.4.8)

Moved Permenently? soso, wohin denn?


debian:~# wget http://gems.rubyforge.org/latest_specs.4.8
--2010-07-27 23:30:29-- http://gems.rubyforge.org/latest_specs.4.8
Auflösen des Hostnamen »gems.rubyforge.org«.... 72.4.120.124
Verbindungsaufbau zu gems.rubyforge.org|72.4.120.124|:80... verbunden.
HTTP Anforderung gesendet, warte auf Antwort... 301 Moved Permanently
Platz: http://rubygems.org/latest_specs.4.8[folge]
--2010-07-27 23:30:29-- http://rubygems.org/latest_specs.4.8
Auflösen des Hostnamen »rubygems.org«.... 72.4.120.124
Wiederverwendung der bestehenden Verbindung zu gems.rubyforge.org:80.
HTTP Anforderung gesendet, warte auf Antwort... 302 Found
Platz: http://production.s3.rubygems.org/latest_specs.4.8[folge]
--2010-07-27 23:30:29-- http://production.s3.rubygems.org/latest_specs.4.8
--skip--

interessant, na dann adden wir doch die neue URL als source und löschen die alte...


debian:~# gem sources -a http://production.s3.rubygems.org/
http://production.s3.rubygems.org/ added to sources

debian:~# gem sources -r http://gems.rubyforge.org/
http://gems.rubyforge.org/ removed from sources

so, nun sollte ein "gem install mysql" funktionieren...


debian:~# gem install mysql
Building native extensions. This could take a while...
Successfully installed mysql-2.8.1
1 gem installed

Notiz: wenn "gem install mysql" mit der Meldung: "extconf.rb:10:in `require': no such file to load -- mkmf (LoadError) from extconf.rb:10" oder ähnlich abbricht - dann hilft ein "apt-get install ruby-dev"

Kommentare

1000 Dank

Das war der entscheidende Tipp! Herzlichen Dank!

Genau das hab ich gesucht !

Genau das hab ich gesucht ! danke

Danke!

Genau die Information habe ich gesucht. Vielen Dank, Alex!

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <img> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.
  • You may link to Gallery2 items on this site using a special syntax.

Weitere Informationen über Formatierungsoptionen

CAPTCHA
Diese Frage dient dazu festzustellen, ob Sie ein Mensch sind und um automatisierte SPAM-Beiträge zu verhindern, bitte auf Groß- und Kleinschreibung achten!
  ____            ____   _   _                    
| _ \ ___ / ___| | \ | | _ __ ___ _ __
| | | | / __| | | | \| | | '_ ` _ \ | '__|
| |_| | | (__ | |___ | |\ | | | | | | | | |
|____/ \___| \____| |_| \_| |_| |_| |_| |_|
Enter the code depicted in ASCII art style.