Cómo actualizar rubygems
Necesito actualizar gems a la versión 1.8 intenté instalar los respectivos paquetes debian pero parece que no se está actualizando
anujm@test:~$ dpkg -l |grep -i rubygem
ii rubygems 1.3.5-1ubuntu2 package management framework for Ruby libraries/applications
ii rubygems-lwes 0.8.2-1323277262 LWES rubygems
ii rubygems1.8 1.3.5-1ubuntu2 package management framework for Ruby libraries/applications
ii rubygems1.9 1.3.5-1ubuntu2 package management framework for Ruby libraries/applications
anujm@test:~$
anujm@test:~$ gem
gem gem1.8 gem1.9
anujm@test:~$ sudo gem1.8 install serve
ERROR: Error installing serve:
multi_json requires RubyGems version >= 1.3.6
anujm@test:~$
8 answers
Instalar rubygems-actualizar
gem install rubygems-update
update_rubygems
gem update --system
Ejecute estos comandos como root o use sudo.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-11-29 12:49:03
Puedes actualizar todas las gemas simplemente realizando:
sudo gem update
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-01-11 09:25:36
O:
gem update `gem outdated | cut -d ' ' -f 1`
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-03-08 09:34:25
Puede actualizar gem a cualquier versión específica como esta,
gem update --system 'version'
gem update --system '2.3.0'
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-09-16 10:22:09
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-11-29 12:47:31
Para mí bastaba simplemente ejecutar
gem update
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-01-24 09:05:44
Encontré que otras respuestas eran inexactas/desactualizadas. Lo mejor es que se refiera a la documentación real.
Versión corta: en la mayoría de los casos gem update --system
será suficiente.
No debe usar a ciegas sudo
. De hecho, si no está obligado a hacerlo, lo más probable es que no lo use.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-04-12 14:44:08
Para actualizar solo una gema (y sus dependencias), haga:
bundle update gem-name
Pero para actualizar solo la gema (sin actualizar sus dependencias), haga
bundle update --source gem-name
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-01-17 22:02:51