Requiriendo mi Gema >> desde rails, la puedo incluir en el Gemfile
gem 'imposition'
pero no carga las dependencias
/var/lib/gems/1.8/gems/imposition-0.8.8/lib/imposition/metodos.rb:4:in `require': no such file to load -- uuidtools (LoadError) from /var/lib/gems/1.8/gems/imposition-0.8.8/lib/imposition/metodos.rb:4 from /var/lib/gems/1.8/gems/imposition-0.8.8/lib/imposition.rb:3:in `require' from /var/lib/gems/1.8/gems/imposition-0.8.8/lib/imposition.rb:3 from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `require' from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `require' from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in `each' from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in `require' from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `each' from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `require' from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler.rb:119:in `require' from /home/roberto/Documentos/imPOSTO/mascara/config/application.rb:7 from /var/lib/gems/1.8/gems/railties-3.2.7/lib/rails/commands.rb:53:in `require' from /var/lib/gems/1.8/gems/railties-3.2.7/lib/rails/commands.rb:53 from /var/lib/gems/1.8/gems/railties-3.2.7/lib/rails/commands.rb:50:in `tap' from /var/lib/gems/1.8/gems/railties-3.2.7/lib/rails/commands.rb:50 from script/rails:6:in `require' from script/rails:6
Sin embargo bundle install sí me instala bien la gema
... Using imposition (0.8.8) Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
¿Será que está malo mi gemspec? ¿Por qué no trae las dependencias?
Efectivamente no había instalado la versión con dependencias >>
Still a de a…
Al parecer este error de carga tenía que ver con que no se estaba bajando una dependencia de mi gema (fileutils) >>
Pero ahora sale
/var/lib/gems/1.8/gems/imposition-0.8.9/lib/imposition/metodos.rb:37:in `checksCompile': uninitialized constant Metodos::UUIDTools (NameError) from /var/lib/gems/1.8/gems/imposition-0.8.9/lib/imposition.rb:11
Ahm, éso era porque no estaba haciendo require en el archivo de inicialización de la gema. Sobre ése tema, ver este post >>.
Shau pescau.