Comments (16)
Who needs rdoc/ri generation on a server? Especially on an automated server?
Skipping rdoc/ri generation would be fantastic.
from rvm.
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.
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.
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.
Thanks!
from rvm.
+1
from rvm.
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.
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.
Great, I saw your patch to RVM. I'll get this added in the next couple of days, thanks for your help!
from rvm.
Done! Looks okay?
from rvm.
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.
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.
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.
+1
from rvm.
Awesome! :)
from rvm.
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)
- user::install only supports one user HOT 1
- Is this project dead? HOT 7
- Deprecated Features HOT 2
- cannot load such file -- chef/mixin/command HOT 6
- gem_package recipe breaks chef_gem HOT 1
- Chef 12.17.5: could not find filename for attribute .gitkeep in cookbook rvm HOT 1
- How do you use this with chef solo? HOT 1
- Use --no-document instead of --no-rdoc --no-ri HOT 5
- Compatibility with Ubuntu 18.04 HOT 4
- Dangerfile should use failure instead of fail
- Remove .rubocop.yml with Dangerfile
- Update Changelog
- Run latest cookstyle
- Update builds to be parallel
- Could not parse `-/metadata.rb': undefined method `chef_version' HOT 2
- Support Modern Operating systems and have working dokken
- Error: cannot load such file -- rvm HOT 7
- rvm Chef 17 compatibility
- No resource, method, or local variable named `create_rvm_shell_chef_wrapper' for `Chef::Recipe "default"' HOT 2
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rvm.