Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Option to omit Rdoc #156

Closed
jelder opened this Issue Apr 19, 2012 · 12 comments

Comments

Projects
None yet
10 participants

jelder commented Apr 19, 2012

It seems like rbenv/ruby-build is becoming the de facto method of getting Ruby >= 1.9.3. For production servers, it would be nice if we could skip the unnecessary step of building Rdoc. Can this be an option please?

Collaborator

sstephenson commented Apr 23, 2012

I agree. Let's figure out how to do this for the next version of ruby-build.

Installing with documentation should be the default, but we should skip it if you pass the --no-doc flag.

trans commented Apr 27, 2012

So why not support #131, and this could be another such extension?

Cross-definition option would be nice, but we can omit rdoc generation already:
CONFIGURE_OPTS="--disable-install-rdoc" ruby-build 1.9.3-p194

And with ree, you can disable rdoc with:

CONFIGURE_OPTS="--no-dev-docs" rbenv install ree-1.8.7-2012.02

From the REE-installer (took me a while to find):

[ruby-enterprise-1.8.7-2012.02]=> ./installer --help
Usage: installer [options]

    -a, --auto PREFIX                Configure Ruby with prefix PREFIX and
                                     install it without any user interaction.
        --destdir DIR                Install everthing under the given
                                     destination directory. Used when building
                                     packages for Ruby Enterprise Edition.
    -c, --configure-arg ARG          Pass an extra argument to the Ruby
                                     configure script. You can specify this
                                     option multiple times to pass multiple
                                     arguments.
        --dont-install-useful-gems   Do not install a few useful gems that are
                                     normally installed as well: passenger,
                                     rails, mysql, etc.
        --no-tcmalloc                Do not install tcmalloc support.
        --no-dev-docs                Do not install Ruby developer
                                     documentation.
    -h, --help                       Show this message.
Collaborator

jeremy commented Feb 1, 2013

You can turn this off using --disable-install-rdoc but it'd be great to do it by default. Can pass --enable-install-rdoc to enable.

fnichol added a commit to sous-chefs/ruby_rbenv that referenced this issue May 31, 2013

NO MORE RDOC WHEN COMPILING RUBIES IN TEST!
Seriously, this burns up so much time in the build process. Some hints
taken from rbenv/ruby-build#156.

@mislav mislav added the enhancement label Apr 5, 2014

SaimonL commented Jul 30, 2014

I always do:

./configure --disable-install-doc

Which does not install rdoc and cdoc. I don't need them and this speeds up the overall install process.

Collaborator

mislav commented Sep 9, 2014

I started doing export RUBY_CONFIGURE_OPTS=--disable-install-doc in my non-dev environments to globally disable RDoc generation but that screws up Rubinius installs since ruby-build respects RUBY_CONFIGURE_OPTS for rbx. (╯°□°)╯︵ ┻━┻

SaimonL commented Nov 20, 2014

Before install Ruby and rails:

echo "gem: --no-document" > ~/.gemrc
sudo echo "gem: --no-document" > /etc/gemrc

Ruby Install:

./configure --disable-install-doc

Gem Install:

gem install thin --no-document 
gem install update --no-document 
Collaborator

mislav commented Nov 20, 2014

@SaimonL That's a good practice to keep while installing gems. I have it set up that way in my ~/.gemrc as well. But in this thread we're discussing about preventing RDoc/ri generation for a Ruby version that's being installed, not any specific RubyGem. Since installation of Ruby itself doesn't (and shouldn't) respect ~/.gemrc, we have to pass the configuration process specific flags to prevent the default RDoc generation.

@hsbt hsbt added the rubinius label Mar 18, 2015

swrobel commented Oct 26, 2015

Was this option ever added or is the best course of action still do to the following?

RUBY_CONFIGURE_OPTS=--disable-install-doc ruby-build ...

Collaborator

mislav commented Oct 26, 2015

No, there isn't an option yet. Yes, the environment variable is still the way to go.

Collaborator

hsbt commented Jul 26, 2017

We can select to omit documentation generating with RUBY_CONFIGURE_OPT. I think it's better than the built-in option of ruby-build.

@hsbt hsbt closed this Jul 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment