PageRenderTime 59ms CodeModel.GetById 31ms RepoModel.GetById 0ms app.codeStats 0ms

/README.md

https://bitbucket.org/jonforums/uru
Markdown | 165 lines | 114 code | 51 blank | 0 comment | 0 complexity | ce5318d451cb57ac44600a17a219decb MD5 | raw file
  1. # Unleash Ruby
  2. **Current Version:** 0.8.5
  3. **News:** [latest][news]
  4. **Downloads:** [latest][download]
  5. Uru is a lightweight, multi-platform command line tool that helps you use the
  6. multiple rubies (currently MRI, JRuby, and Rubinius) on your 32/64-bit Linux,
  7. OS X, or Windows systems.
  8. While there are a number of fantastic ruby environment managers such as [RVM][1],
  9. [rbenv][2], [pik][3], and [chruby][4], none are truely multi-platform, and all
  10. provide different levels of awesomeness. In contrast, [uru][5] is a micro-kernel.
  11. It provides a core set of minimal complexity, multi-platform ruby use enhancers.
  12. In many cases, Ruby is a multi-platform joy to use. Shouldn't your ruby environment
  13. manager also be?
  14. # Easy to Install
  15. The quickest path to uru zen is to [download][download] the binary archive for
  16. your platform type, extract its contents to a directory already on `PATH`, and
  17. perform one of the following installs. To build and install uru from Go source,
  18. or get more in-depth details, review the [installation and usage][usage] info.
  19. ## Windows systems
  20. ~~~ console
  21. :: Extract uru_rt.exe to a dir already on PATH and install. For example, assuming
  22. :: uru_rt.exe was extracted to C:\tools already on your PATH, install uru like
  23. C:\tools>uru_rt admin install
  24. :: [OPTIONAL] If you have a pre-existing ruby already on PATH from cmd.exe
  25. :: initialization, you can register it as the "system" ruby. A "system" ruby is
  26. :: almost always a bad idea.
  27. C:\tools>uru_rt admin add system
  28. ~~~
  29. Windows users may also install `uru`
  30. * by using [Scoop][scoop] to install via `scoop install https://bitbucket.org/jonforums/uru/downloads/uru.json`
  31. * by using the [Chocolatey][chocolatey] package manager
  32. * in Cygwin or MSYS2 [bash-like environments][bashonwindows] while remaining
  33. compatible with `cmd.exe` and `powershell` usage
  34. * in [Fish shells][fish] on Cygwin or MSYS2 by placing `uru_rt.exe` on Fish's `PATH`
  35. and doing a one time install via `echo 'uru_rt admin install | source' >> ~/.config/fish/config.fish`
  36. ## Linux and OS X systems
  37. ~~~ console
  38. # Extract uru_rt to a dir already on PATH and install. For example, assuming
  39. # uru_rt was extracted to ~/bin already on your PATH, install uru like
  40. $ cd ~/bin && chmod +x uru_rt
  41. # Append to ~/.profile on Ubuntu, or to ~/.zshenv on Zsh
  42. $ echo 'eval "$(uru_rt admin install)"' >> ~/.bash_profile
  43. # [OPTIONAL] If you have a pre-existing ruby already on PATH from bash/Zsh
  44. # startup configuration files, you can register it as the "system" ruby.
  45. # A "system" ruby is almost always a bad idea.
  46. $ uru_rt admin add system
  47. # Restart the shell
  48. $ exec $SHELL --login
  49. # If the `uru` command is not available when using bash via your desktop
  50. # environment's terminal emulator, append this to your .bashrc file.
  51. $(declare -F uru > /dev/null) || eval "$(uru_rt admin install)"
  52. ~~~
  53. Linux and OS X users may also install `uru`
  54. * in [Fish shells][fish] by placing `uru_rt` on Fish's `PATH` and doing a one time
  55. install via `echo 'uru_rt admin install | source' >> ~/.config/fish/config.fish`
  56. # Easy to Use
  57. While more detailed examples of uru's core commands are [available here][examples],
  58. once you have registered your installed rubies with uru, usage is similar to:
  59. ~~~ bash
  60. $ uru ls
  61. 174 : jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) S...
  62. 200p255 : ruby 2.0.0p255 (2013-07-07 revision 41812) [i686-linux]
  63. => system : ruby 2.1.0dev (2013-07-06 trunk 41808) [i686-linux]
  64. $ uru 174
  65. ---> Now using jruby 1.7.4 tagged as `174`
  66. $ uru ls
  67. => 174 : jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) S...
  68. 200p255 : ruby 2.0.0p255 (2013-07-07 revision 41812) [i686-linux]
  69. system : ruby 2.1.0dev (2013-07-06 trunk 41808) [i686-linux]
  70. $ jruby --version
  71. jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) Server VM 1.7.0_25-b15 [linux-i386]
  72. $ uru sys
  73. ---> Now using ruby 2.1.0-dev tagged as `system`
  74. $ uru ls --verbose
  75. 174 : jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) S...
  76. ID: 1.7.4
  77. Home: /home/jon/.rubies/jruby-1.7.4/bin
  78. GemHome: /home/jon/.gem/jruby/1.7.4
  79. 200p255 : ruby 2.0.0p255 (2013-07-07 revision 41812) [i686-linux]
  80. ID: 2.0.0-p255
  81. Home: /home/jon/.rubies/ruby-2.0.0/bin
  82. GemHome: /home/jon/.gem/ruby/2.0.0
  83. => system : ruby 2.1.0dev (2013-07-06 trunk 41808) [i686-linux]
  84. ID: 2.1.0-dev
  85. Home: /usr/local/bin
  86. GemHome:
  87. $ uru gem li rake
  88. ruby 2.0.0p255 (2013-07-07 revision 41812) [i686-linux]
  89. rake (10.1.0, 0.9.6)
  90. ruby 2.1.0dev (2013-07-06 trunk 41808) [i686-linux]
  91. rake (10.1.0, 0.9.6)
  92. jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) Server VM 1.7.0_25-b15 [linux-i386]
  93. rake (10.1.0, 10.0.3)
  94. $ uru ruby -e 'name="You"; puts "Hello #{name}!"'
  95. ruby 2.0.0p255 (2013-07-07 revision 41812) [i686-linux]
  96. Hello You!
  97. ruby 2.1.0dev (2013-07-06 trunk 41808) [i686-linux]
  98. Hello You!
  99. jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) Server VM 1.7.0_25-b15 [linux-i386]
  100. Hello You!
  101. ~~~
  102. [news]: https://bitbucket.org/jonforums/uru/wiki/News
  103. [download]: https://bitbucket.org/jonforums/uru/wiki/Downloads
  104. [usage]: https://bitbucket.org/jonforums/uru/wiki/Usage
  105. [examples]: https://bitbucket.org/jonforums/uru/wiki/Examples
  106. [scoop]: https://bitbucket.org/jonforums/uru/wiki/Scoop
  107. [chocolatey]: https://bitbucket.org/jonforums/uru/wiki/Chocolatey
  108. [bashonwindows]: https://bitbucket.org/jonforums/uru/wiki/BashOnWindows
  109. [fish]: https://bitbucket.org/jonforums/uru/wiki/FishShell
  110. [1]: https://rvm.io/
  111. [2]: https://github.com/sstephenson/rbenv
  112. [3]: https://github.com/vertiginous/pik
  113. [4]: https://github.com/postmodern/chruby
  114. [5]: https://bitbucket.org/jonforums/uru