Permalink
Browse files

Add more docs

  • Loading branch information...
1 parent 140987a commit f2b26d22a998476089d7fa8349ead78c33f9925a @Sutto Sutto committed Aug 26, 2010
Showing with 303 additions and 55 deletions.
  1. +64 −51 README
  2. +1 −1 binscripts/rvm-auto-ruby
  3. +23 −0 help/cleanup
  4. +15 −0 help/disk-usage
  5. +22 −0 help/docs
  6. +33 −0 help/exec
  7. +15 −0 help/migrate
  8. +23 −0 help/repair
  9. +11 −0 help/rubygems
  10. +34 −0 help/rvmrc
  11. +15 −0 help/snapshot
  12. +22 −0 help/tools
  13. +18 −0 help/upgrade
  14. +6 −2 scripts/disk-usage
  15. +1 −1 scripts/utility
View
115 README
@@ -17,7 +17,6 @@ Flags
--docs - with install, attempt to generate ri after installation.
--reconfigure - Force ./configure on install even if Makefile already exists.
-
Options
-v|--version - Emit rvm version loaded for current shell
@@ -41,58 +40,74 @@ Options
options then append them comma separated: -C --...,--...,--...
--nice - process niceness (for slow computers, default 0)
--ree-options - Options passed directly to ree's './installer' on the command line.
+ --with-rubies - Specifies a string for rvm to attempt to expand for set operations.
Action
- * usage - show this usage information
- version - show the rvm version installed in rvm_path
- use - setup current shell to use a specific ruby version
- reload - reload rvm source itself (useful after changing rvm source)
- implode - (seppuku) removes the rvm installation completely.
- This means everything in $rvm_path (~/.rvm).
- This does not touch your profiles, which is why
- there is an if around the sourcing scripts/rvm.
- update - upgrades rvm to the latest version.
- (If you experience bugs try this first with --head)
- reset - remove current and stored default & system settings.
- (If you experience odd behavior try this second)
- info - show the *current* environment information for current ruby
- debug - show info plus additional information for common issues
-
- install - install one or many ruby versions
- See also: http://rvm.beginrescueend.com/rubies/installing/
- uninstall - uninstall one or many ruby versions, leaves their sources
- remove - uninstall one or many ruby versions and remove their sources
-
- wrapper - generates a set of wrapper executables for a given ruby with the
- specified ruby and gemset combination. Used under the hood for
- passenger support and the like.
-
- cleanup - Lets you remove stale source folders / archives and other miscellaneous
- data associated with rvm.
-
- ruby - runs a named ruby file against specified and/or all rubies
- gem - runs a gem command using selected ruby's 'gem'
- rake - runs a rake task against specified and/or all rubies
- tests - runs 'rake test' across selected ruby versions
- specs - runs 'rake spec' across selected ruby versions
- monitor - Monitor cwd for testing, run `rake {spec,test}` on changes.
-
- gemset - gemsets: http://rvm.beginrescueend.com/gemsets/
-
- gemdir - display the path to the current gem directory (GEM_HOME).
- srcdir - display the path to rvm source directory (may be yanked)
-
- fetch - Performs an archive / src fetch only of the selected ruby.
- list - show currently installed rubies, interactive output.
- http://rvm.beginrescueend.com/rubies/list/
- package - Install a dependency package {readline,iconv,zlib,openssl}
- http://rvm.beginrescueend.com/packages/
- notes - Display notes, with operating system specifics.
-
- snapshot - Let's your backup / restore an rvm installation in a lightweight manner.
+ (Note that for most actions, 'rvm help action-name' may provide more information.)
+
+ * usage - show this usage information
+ version - show the rvm version installed in rvm_path
+ use - setup current shell to use a specific ruby version
+ reload - reload rvm source itself (useful after changing rvm source)
+ implode - (seppuku) removes the rvm installation completely.
+ This means everything in $rvm_path (~/.rvm).
+ This does not touch your profiles, which is why
+ there is an if around the sourcing scripts/rvm.
+ update - upgrades rvm to the latest version.
+ (If you experience bugs try this first with --head)
+ reset - remove current and stored default & system settings.
+ (If you experience odd behavior try this second)
+ info - show the *current* environment information for current ruby
+ debug - show info plus additional information for common issues
+
+ install - install one or many ruby versions
+ See also: http://rvm.beginrescueend.com/rubies/installing/
+ uninstall - uninstall one or many ruby versions, leaves their sources
+ remove - uninstall one or many ruby versions and remove their sources
+
+ migrate - Lets you migrate all gemsets from one ruby to another.
+ upgrade - Lets you upgrade from one version of a ruby to another, including
+ migrating your gemsets semi-automatically.
+
+ wrapper - generates a set of wrapper executables for a given ruby with the
+ specified ruby and gemset combination. Used under the hood for
+ passenger support and the like.
+
+ cleanup - Lets you remove stale source folders / archives and other miscellaneous
+ data associated with rvm.
+ repair - Lets you repair parts of your environment e.g. wrappers, env files and
+ and similar files (e.g. general maintenance).
+ snapshot - Lets your backup / restore an rvm installation in a lightweight manner.
- migrate - Let's you migrate all gemsets from one ruby to another.
+ disk-usage - Tells you how much disk space rvm install is using.
+ tools - Provides general information about the ruby environment,
+ primarily useful when scripting rvm.
+ docs - Tools to make installing ri and rdoc documentation easier.
+ rvmrc - Tools related to managing rvmrc trust and loading.
+
+ exec - runs an arbitrary command as a set operation.
+ ruby - runs a named ruby file against specified and/or all rubies
+ gem - runs a gem command using selected ruby's 'gem'
+ rake - runs a rake task against specified and/or all rubies
+ tests - runs 'rake test' across selected ruby versions
+ specs - runs 'rake spec' across selected ruby versions
+ monitor - Monitor cwd for testing, run `rake {spec,test}` on changes.
+
+ gemset - gemsets: http://rvm.beginrescueend.com/gemsets/
+
+ rubygems - Lets you switch the installed version of rubygems for a given
+ 1.8-compatible ruby.
+
+ gemdir - display the path to the current gem directory (GEM_HOME).
+ srcdir - display the path to rvm source directory (may be yanked)
+
+ fetch - Performs an archive / src fetch only of the selected ruby.
+ list - show currently installed rubies, interactive output.
+ http://rvm.beginrescueend.com/rubies/list/
+ package - Install a dependency package {readline,iconv,zlib,openssl}
+ http://rvm.beginrescueend.com/packages/
+ notes - Display notes, with operating system specifics.
Implementation
@@ -109,9 +124,7 @@ Implementation
default - use rvm set default ruby and system if it hasn't been set.
http://rvm.beginrescueend.com/rubies/default/
-
Resources:
http://rvm.beginrescueend.com/
https://www.pivotaltracker.com/projects/26822
-
View
@@ -14,6 +14,6 @@ else
fi
[[ -s "$rvm_environments_path/default" ]] && source "$rvm_environments_path/default"
-rvm load-rvmrc > /dev/null 2>&1
+rvm rvmrc load > /dev/null 2>&1
exec ruby "$@"
View
@@ -0,0 +1,23 @@
+
+∴ rvm cleanup {all,archives,repos,sources,logs}
+
+Performs general cleanup for the specific set of rvm directories.
+
+Useful for reclaiming needlessly used disk space from rvm compiles
+and the like.
+
+Examples:
+
+To reclaim all of the space used by archives, repository clones,
+source files (and associated temporary compile file) and logs, you'd
+run:
+
+ ∴ rvm cleanup all
+
+If instead you only wanted to clean up source files, you'd run:
+
+ ∴ rvm cleanup sources
+
+Please note that sometimes have archives and sources around are desirable.
+Namely, you need the sources to install something such as ruby-debug under
+1.9.
View
@@ -0,0 +1,15 @@
+
+∴ rvm disk-usage {all,archives,repos,sources,logs,packages,rubies,gemsets}
+
+Returns the amount of disk space used by a specific set of data associated
+with rvm. All returns all of them individually plus the total space used.
+
+Examples:
+
+To find out how much space your rvm install is using, simply run:
+
+ ∴ rvm disk-usage all
+
+To find out how much space only your gemsets use, run:
+
+ ∴ rvm disk-usage gemsets
View
@@ -0,0 +1,22 @@
+
+∴ rvm docs {generate,generate-ri,generate-rdoc}
+
+Generates ri and / or rdoc documentation for the current ruby.
+
+If you have the hanna gem installed, rdoc generation should automatically use it.
+Alternatively, you can pass the --docs flag to automatically call 'rvm docs generate'
+as part of the install process.
+
+Examples:
+
+ ∴ rvm docs generate
+
+Generates both ri and rdoc documentation for the current ruby.
+
+ ∴ rvm docs generate-ri
+
+Generates only ri documentation for the current ruby.
+
+ ∴ rvm docs generate-rdoc
+
+Generates only rdoc documentation for the current ruby.
View
@@ -0,0 +1,33 @@
+
+∴ rvm exec some-command
+
+Executes arbitrary commands against rvm set operations. If given a set that
+matches a single ruby command, it will exec the command directly without printing
+out extra rvm information.
+
+Examples:
+
+To execute 'ruby -v' against all installed rubies and aliases, you would run:
+
+ ∴ rvm exec ruby -v
+
+If you instead want to execute it against a specific ruby (without extra logging
+/ data printed by rvm as is done with normal set operations), you can instead do:
+
+ ∴ rvm ree exec ruby -v
+
+Since it is a set operation, normal ruby specifiers will work. As an example, to run
+it against 1.9.2 and 1.8.7, you would run:
+
+ ∴ rvm 1.9.2,1.8.7 exec ruby -v
+
+Or, to execute 'gem env' against all gemsets:
+
+ ∴ rvm --with-rubies all-gemsets exec gem env
+
+To execute 'which ruby' in the current directory, loading a .rvmrc and falling back
+to the default ruby:
+
+ ∴ rvm --with-rubies default-with-rvmrc exec which ruby
+
+For more information, look up the rvm set operations.
View
@@ -0,0 +1,15 @@
+
+∴ rvm migrate from to
+
+Efficiently moves the gems from one ruby to another.
+Like 'rvm gemset copy' but removes the gems from the source
+ruby afterwards and runs it against all gemsets for a given
+ruby.
+
+Examples:
+
+To migrate all gemsets from rc2 of 1.9.2 to the first release, p0,
+you'd run:
+
+ ∴ rvm migrate 1.9.2-rc2 1.9.2-p0
+
View
@@ -0,0 +1,23 @@
+
+∴ rvm repair {symlinks,environments,archives,all}
+
+Runs generate repair processes against given parts of rvm.
+
+Examples:
+
+To regenerate all of the environment files inside your rvm/environments
+directory, you'd run:
+
+ ∴ rvm repair environments
+
+To check for stale symlinks caused by rvm in your rvm_bin_path, you'd run:
+
+ ∴ rvm repair symlinks
+
+To verify all downloaded archives have the correct md5, you'd run:
+
+ ∴ rvm repair archives
+
+Or, to do all of the above, you'd run:
+
+ ∴ rvm repair all
View
@@ -0,0 +1,11 @@
+
+∴ rvm rubygems [version]
+
+Installs a specific rubygems version in the current ruby. If
+current is specified, will install the most current rubygems
+as known by rvm.
+
+Please note that currently this is only compatible with ruby
+1.8.* and ruby enterprise edition. If your system isn't supported,
+running the command will generate an error message.
+
View
@@ -0,0 +1,34 @@
+
+∴ rvm rvmrc {trust,untrust,trusted,load,reset} [optional-path]
+
+Tools for dealing with and loading the rvmrc trust for a given directory.
+All actions take an optional path to a directory to check.
+
+Examples:
+
+To check the status of ~/My/project, you'd run:
+
+ ∴ rvm rvmrc trusted ~/My/project
+
+Or, more conventionally,
+
+ ∴ cd ~/My/project && rvm rvmrc trusted
+
+To manually set it as trusted:
+
+ ∴ rvm rvmrc trust ~/My/project
+
+Or, to reset the trust and force a prompt:
+
+ ∴ rvm rvmrc reset ~/My/project
+
+Finally, to load the rvmrc in a directory, you'd run:
+
+ ∴ rvm rvmrc load ~/My/project
+
+Or,
+
+ ∴ cd ~/My/project && rvm rvmrc load
+
+Note that this replaces 'rvm load-rvmrc'. Note that load implicity trusts the
+rvmrc, even if it is set to untrusted.
View
@@ -0,0 +1,15 @@
+
+∴ rvm snapshot {load,save} filename
+
+Saves or creates a snapshot of the given rvm install. This includes:
+
+* Settings
+* Aliases
+* Rubies
+* Gemsets
+* Packages
+* Your Default
+
+Ideally to make it easy to have a consistent environment among machines
+/ to back up your environment. Please note that this is still considered
+experimental to a large degree.
View
@@ -0,0 +1,22 @@
+
+∴ rvm tools {identifier,path-identifier,strings}
+
+Provides generic tools related to rvm environments for getting information
+about your current environment. Primarily used for scripting rvm.
+
+Examples:
+
+To get the expanded ruby string of the current environment, we'd run:
+
+ ∴ rvm tools identifier
+
+To get the identifier for a folder (taking into account rvmrc files and the like),
+we're instead run:
+
+ ∴ rvm tools path-identifier ~/path/to/directory
+
+Lastly, we can example ruby strings. E.g., to get the current ree version, we'd
+run:
+
+ ∴ rvm tools strings ree
+
View
@@ -0,0 +1,18 @@
+
+∴ rvm upgrade ruby-prefix [optional-source]
+
+Attempts to install the latest version of a given ruby (still experimental).
+
+Given a ruby prefix (e.g. 1.9.2), it attempts to upgrade your last installed
+version, migrating gemsets.
+
+The process will prompt you at each stage - if the versions look incorrect,
+please cancel and perform it manually.
+
+Examples:
+
+If you have 1.9.2-rc2 installed and want to switch it to 1.9.2-p0,
+
+ ∴ rvm upgrade 1.9.2
+
+Will install 1.9.2-p0 and migrate the gemsets.
Oops, something went wrong.

0 comments on commit f2b26d2

Please sign in to comment.