Coder Social home page Coder Social logo

Comments (16)

yfeldblum avatar yfeldblum commented on July 24, 2024

Who needs rdoc/ri generation on a server? Especially on an automated server?

Skipping rdoc/ri generation would be fantastic.

from rvm.

fnichol avatar fnichol commented on July 24, 2024

Agreed, I hate that as well (rubygems/rubygems#42). Only thing I'm iffy on is going against the rubygems default (principal of least surprise), even if it's kinda lame. Besides, it's possible that the cookbook could be used for development workstations as well.

What do you both think about an attribue, something like:

default['rvm']['gem_docs'] = true

which could be overridden to false (that's what I'd drop in my role definitions that tweak rvm defaults).

To be honest, I forgot about this build delay because sooner or later I drop in a /etc/gemrc file and it's done. Good catch!

from rvm.

rosenfeld avatar rosenfeld commented on July 24, 2024

I think it is a good idea, but I think the default should be false because it is the most common option for most automated install environments.

from rvm.

fnichol avatar fnichol commented on July 24, 2024

I don't think my arm needed too much twisting there. Will do (make false the default) then those who want the docs can at least ask to get them. Now to update...

from rvm.

rosenfeld avatar rosenfeld commented on July 24, 2024

Thanks!

from rvm.

yfeldblum avatar yfeldblum commented on July 24, 2024

+1

from rvm.

fnichol avatar fnichol commented on July 24, 2024

So, it looks like the Chef::Provider::Rubygems provider already kills docs on gem install (https://github.com/opscode/chef/blob/0.9-stable/chef/lib/chef/provider/package/rubygems.rb#L420). Can either of you confirm with -l debug on a chef execution? Here is an example when I bundler gets installed:

[Sun, 01 May 2011 21:12:18 -0700] DEBUG: Processing rvm_gem[bundler] on cb-tester
[Sun, 01 May 2011 21:12:18 -0700] DEBUG: Executing grep -q "^bundler" "/usr/local/rvm/gemsets/global.gems"
: stdout
[default] [Sun, 01 May 2011 21:12:18 -0700] DEBUG: ---- Begin output of grep -q "^bundler" "/usr/local/rvm/gemsets/global.gems" ----
[Sun, 01 May 2011 21:12:18 -0700] DEBUG: STDOUT: 
[Sun, 01 May 2011 21:12:18 -0700] DEBUG: STDERR: 
[Sun, 01 May 2011 21:12:18 -0700] DEBUG: ---- End output of grep -q "^bundler" "/usr/local/rvm/gemsets/global.gems" ----
[Sun, 01 May 2011 21:12:18 -0700] DEBUG: Ran grep -q "^bundler" "/usr/local/rvm/gemsets/global.gems" returned 1
[Sun, 01 May 2011 21:12:18 -0700] DEBUG: Executing echo "bundler" >> "/usr/local/rvm/gemsets/global.gems"
[default] [Sun, 01 May 2011 21:12:18 -0700] DEBUG: ---- Begin output of echo "bundler" >> "/usr/local/rvm/gemsets/global.gems" ----
[Sun, 01 May 2011 21:12:18 -0700] DEBUG: STDOUT: 
[Sun, 01 May 2011 21:12:18 -0700] DEBUG: STDERR: 
[Sun, 01 May 2011 21:12:18 -0700] DEBUG: ---- End output of echo "bundler" >> "/usr/local/rvm/gemsets/global.gems" ----
[Sun, 01 May 2011 21:12:18 -0700] DEBUG: Ran echo "bundler" >> "/usr/local/rvm/gemsets/global.gems" returned 0
[Sun, 01 May 2011 21:12:18 -0700] INFO: Ran execute[Add bundler to /usr/local/rvm/gemsets/global.gems] successfully
[default] [Sun, 01 May 2011 21:12:19 -0700] DEBUG: sh(bash -c "source /etc/profile.d/rvm.sh" && rvm ruby-1.8.7-p334@global gem env gempath)
: stdout
[default] [Sun, 01 May 2011 21:12:20 -0700] DEBUG: No installed version found for bundler (>= 0, runtime)
[Sun, 01 May 2011 21:12:20 -0700] DEBUG: sh(bash -c "source /etc/profile.d/rvm.sh" && rvm ruby-1.8.7-p334@global gem env)
: stdout
[default] [Sun, 01 May 2011 21:12:21 -0700] DEBUG: Found gem bundler version 1.0.12 for platform ruby from http://rubygems.org/
[Sun, 01 May 2011 21:12:21 -0700] INFO: Installing gem_package[bundler] version 1.0.12
[Sun, 01 May 2011 21:12:21 -0700] DEBUG: sh(bash -c "source /etc/profile.d/rvm.sh" && rvm ruby-1.8.7-p334@global gem install bundler -q --no-rdoc --no-ri -v "1.0.12")
: stdout
[default] [Sun, 01 May 2011 21:12:28 -0700] DEBUG: Processing execute[Add bundler to /usr/local/rvm/gemsets/global.gems] on cb-tester
[Sun, 01 May 2011 21:12:28 -0700] DEBUG: Executing grep -q "^bundler" "/usr/local/rvm/gemsets/global.gems"
: stdout
[default] [Sun, 01 May 2011 21:12:28 -0700] DEBUG: ---- Begin output of grep -q "^bundler" "/usr/local/rvm/gemsets/global.gems" ----
[Sun, 01 May 2011 21:12:28 -0700] DEBUG: STDOUT: 
[Sun, 01 May 2011 21:12:28 -0700] DEBUG: STDERR: 
[Sun, 01 May 2011 21:12:28 -0700] DEBUG: ---- End output of grep -q "^bundler" "/usr/local/rvm/gemsets/global.gems" ----
[Sun, 01 May 2011 21:12:28 -0700] DEBUG: Ran grep -q "^bundler" "/usr/local/rvm/gemsets/global.gems" returned 0
[Sun, 01 May 2011 21:12:28 -0700] DEBUG: Skipping execute[Add bundler to /usr/local/rvm/gemsets/global.gems] due to not_if
[Sun, 01 May 2011 21:12:28 -0700] DEBUG: Processing gem_package[bundler] on cb-tester
[Sun, 01 May 2011 21:12:28 -0700] DEBUG: Found installed gem bundler version 1.0.12 matching bundler (>= 0, runtime)
[Sun, 01 May 2011 21:12:28 -0700] DEBUG: Doing nothing for gem_package[bundler]

from rvm.

rosenfeld avatar rosenfeld commented on July 24, 2024

Hi Fletcher, I think we are talking about different things. You are talking about the 'gem_package' definition, while I'm talking about installing Ruby through RVM. I believe that gem_package won't generated RDoc, but while installing RVM Ruby and watching 'top', I've noticed that 100% of the CPU was being used for generating the docs for the initial/default gems installed by RVM.

I talked with Waynee and told him that we would like to avoid changing gemrc for disabling RDoc generation for the initial gems while installing RVM Ruby. He told me that we could add 'export rvm_gem_options="--no-rdoc --no-ri"' to rvmrc.

What do you think about this option?

from rvm.

fnichol avatar fnichol commented on July 24, 2024

Great, I saw your patch to RVM. I'll get this added in the next couple of days, thanks for your help!

from rvm.

fnichol avatar fnichol commented on July 24, 2024

Done! Looks okay?

from rvm.

rosenfeld avatar rosenfeld commented on July 24, 2024

Yes, it looks ok. I just didn't understand why using "enable"/"disable" instead of true/false. Another approach also would be something like:

default[:rvm][:rvm_gem_options] = "--no-rdoc --no-ri"

What do you think about it?

from rvm.

yfeldblum avatar yfeldblum commented on July 24, 2024

I would at least name it skip_docs_on_gem_install because it affects only the installation of gems, not the installation of rvm or of any rubies.

I might also tend to name it in the positive with a zero/null/empty default, as the following examples:

default[:rvm][:gem_install_docs] = false # option 1
default[:rvm][:gem_install_docs] = [] # option 2

# can be overridden:
node[:rvm][:gem_install_docs] = true # option 1
node[:rvm][:gem_install_docs] = %w[rdoc ri] # option 2

from rvm.

fnichol avatar fnichol commented on July 24, 2024

How does this look? I agree, that feels better. The reason for those crazy "enable"/"disable" values is because I didn't realize you could use boolean value in attributes and the rvm/install_rubies was already in that form. Oh well, it's pre-1.0 so API changes are allowed (so that's updated too).

from rvm.

yfeldblum avatar yfeldblum commented on July 24, 2024

+1

from rvm.

rosenfeld avatar rosenfeld commented on July 24, 2024

Awesome! :)

from rvm.

lock avatar lock commented on July 24, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from rvm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.