rubygems - actualizar - ruby portable
Instalar gema de Github Branch? (4)
En mi gemfile tengo esto:
gem "authlogic", :git => "git://github.com/odorcicd/authlogic.git", :branch => "rails3"
¿Cómo instalo eso como una joya para poder probarlo?
Clona el repositorio de Git.
$ git clone git://github.com/odorcicd/authlogic.gitCambiar al nuevo directorio.
cd authlogicSucursal de pago
$ git checkout -b rails3 remotes/origin/rails3Construye la gema
$ rake build gemInstala la gema
$ gem install pkg/gemname-1.23.gem
No necesita construir la gema localmente. En tu gemfile puedes especificar una fuente github con ref, branch o tag.
gem ''rails'', :git => "git://github.com/rails/rails.git", :ref => "4aded"
gem ''rails'', :git => "git://github.com/rails/rails.git", :branch => "2-3-stable"
gem ''rails'', :git => "git://github.com/rails/rails.git", :tag => "v2.3.5"
Luego ejecuta bundle install o la forma abreviada es simplemente bundle .
Lea más sobre esto aquí: http://bundler.io/man/gemfile.5.html#GIT
Actualización: hay un identificador de fuente github .
gem ''country_select'', github: ''stefanpenner/country_select''
Sin embargo, advierten sobre su uso: NOTE: This shorthand should be avoided until Bundler 2.0, since it currently expands to an insecure git:// URL. This allows a man-in-the-middle attacker to compromise your system. NOTE: This shorthand should be avoided until Bundler 2.0, since it currently expands to an insecure git:// URL. This allows a man-in-the-middle attacker to compromise your system.
Suponiendo que eres un usuario de Bundler,
$ bundle install
instalará las gemas enumeradas en su Gemfile. (Y si no eres un usuario de Bundler, ¿por qué tienes un Gemfile?
Tengo que modificar la respuesta de @ janic_ para que funcione. Espero que ayude a otros noobs de rubí como yo.
Clona el repositorio de Git.
$ git clone git://github.com/odorcicd/authlogic.gitCambiar al nuevo directorio.
$ cd authlogicSucursal de pago
$ git checkout -b rails3 remotes/origin/rails3Instalar paquetes
$ bundle installConstruye la gema
$ rake buildInstala la gema
$ gem install pkg/gemname-1.23.gem