Deshabilite rdoc y ri de gemspec / Gemfile

I have a client gem which I will distribute business clients via rubygems. Gem client has cca. dozen gem dependencies and when it is being installed it takes a long time to install it due to generation of rdoc y ri for each gem.

Clients are business user and they have no use for rdoc/ri, I am looking for a way to disable that via .gemspec or Gemfile. I am familiar with a solution which utilizes system file .gemrc to disable rdoc / ri. But that is not acceptable solution since I want my installation to be simple as typing:

gem install foo

preguntado el 23 de abril de 13 a las 12:04

so save it into a bash script? echo 'gem: --no-ri --no-rdoc' > ~/.gemrc -

@shime How to trigger bash script on gem install foo? -

ah, sorry for misunderstanding. now I understand what's the problem. it seems weird to me, though. I would not like for gem to be able to change my gem installing preferences globally. why wouldn't you simply instruct them to use gem install foo --no-ri --no-rdoc? I don't think there are any pre-installation hooks available. -

I have some basic doubts, please correct me if I'm wrong. If your clients are business users, then its really not their business to dabble with terminal commands, gem install, then using it through irb, etc. That is just technical stuff. If someone is doing those, they are techies, and its not a big deal to ask them to do gem install --no-ri --no-rdoc. I think that while you're trying to sweeten things up for them, it doesn't make operational sense. -

Thanks @Dolphin (and sorry if my doubt had sounded blunt/rude) -

1 Respuestas

Puedes usar un post-install message to explain that they can make it install quicker by running what @shime suggested: echo 'gem: --no-ri --no-rdoc' > ~/.gemrc

Respondido el 03 de junio de 13 a las 22:06

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.