Advertisement
rccharles

part#2 installing and using rbenv

Jan 21st, 2018
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.29 KB | None | 0 0
  1. mac$ #------------------------------------------------------------------------#
  2. Rs-Mac-mini:~ mac$
  3. Rs-Mac-mini:~ mac$ rbenv init
  4. # Load rbenv automatically by appending
  5. # the following to ~/.bash_profile:
  6.  
  7. eval "$(rbenv init -)"
  8.  
  9. Rs-Mac-mini:~ mac$ ls -l
  10. total 0
  11. drwx------+ 5 mac staff 170 Jan 21 23:48 Desktop
  12. drwx------+ 3 mac staff 102 Jan 7 13:26 Documents
  13. drwx------+ 3 mac staff 102 Jan 7 13:26 Downloads
  14. drwx------@ 53 mac staff 1802 Jan 21 23:48 Library
  15. drwx------+ 3 mac staff 102 Jan 7 13:26 Movies
  16. drwx------+ 3 mac staff 102 Jan 7 13:26 Music
  17. drwx------+ 3 mac staff 102 Jan 7 13:26 Pictures
  18. drwxr-xr-x+ 5 mac staff 170 Jan 7 13:26 Public
  19. Rs-Mac-mini:~ mac$ ls -la
  20. total 8
  21. drwxr-xr-x+ 13 mac staff 442 Jan 21 23:21 .
  22. drwxr-xr-x 5 root admin 170 Jan 7 13:26 ..
  23. -r-------- 1 mac staff 7 Jan 7 13:26 .CFUserTextEncoding
  24. drwx------ 2 mac staff 68 Jan 21 19:22 .Trash
  25. drwx------ 3 mac staff 102 Jan 21 23:21 .bash_sessions
  26. drwx------+ 5 mac staff 170 Jan 21 23:48 Desktop
  27. drwx------+ 3 mac staff 102 Jan 7 13:26 Documents
  28. drwx------+ 3 mac staff 102 Jan 7 13:26 Downloads
  29. drwx------@ 53 mac staff 1802 Jan 21 23:48 Library
  30. drwx------+ 3 mac staff 102 Jan 7 13:26 Movies
  31. drwx------+ 3 mac staff 102 Jan 7 13:26 Music
  32. drwx------+ 3 mac staff 102 Jan 7 13:26 Pictures
  33. drwxr-xr-x+ 5 mac staff 170 Jan 7 13:26 Public
  34. Rs-Mac-mini:~ mac$ pwd
  35. /Users/mac
  36. Rs-Mac-mini:~ mac$ nano .bash_profile
  37. Rs-Mac-mini:~ mac$ ls -la
  38. total 16
  39. drwxr-xr-x+ 14 mac staff 476 Jan 22 00:10 .
  40. drwxr-xr-x 5 root admin 170 Jan 7 13:26 ..
  41. -r-------- 1 mac staff 7 Jan 7 13:26 .CFUserTextEncoding
  42. drwx------ 2 mac staff 68 Jan 21 19:22 .Trash
  43. -rw-r--r-- 1 mac staff 52 Jan 22 00:10 .bash_profile
  44. drwx------ 3 mac staff 102 Jan 21 23:21 .bash_sessions
  45. drwx------+ 5 mac staff 170 Jan 21 23:48 Desktop
  46. drwx------+ 3 mac staff 102 Jan 7 13:26 Documents
  47. drwx------+ 3 mac staff 102 Jan 7 13:26 Downloads
  48. drwx------@ 53 mac staff 1802 Jan 21 23:48 Library
  49. drwx------+ 3 mac staff 102 Jan 7 13:26 Movies
  50. drwx------+ 3 mac staff 102 Jan 7 13:26 Music
  51. drwx------+ 3 mac staff 102 Jan 7 13:26 Pictures
  52. drwxr-xr-x+ 5 mac staff 170 Jan 7 13:26 Public
  53. Rs-Mac-mini:~ mac$ rbenv init
  54. # Load rbenv automatically by appending
  55. # the following to ~/.bash_profile:
  56.  
  57. eval "$(rbenv init -)"
  58.  
  59. Rs-Mac-mini:~ mac$ cat .bash_profile
  60. # my bash profile
  61. echo "Running ... .bash_profile
  62.  
  63.  
  64. Rs-Mac-mini:~ mac$ nano .bash_profile
  65. Rs-Mac-mini:~ mac$ cat .bash_profile
  66. # my bash profile
  67. echo "Running ... .bash_profile"
  68.  
  69.  
  70. Rs-Mac-mini:~ mac$ cat .bash_profile
  71. # my bash profile
  72. echo "Running ... .bash_profile"
  73.  
  74.  
  75. Rs-Mac-mini:~ mac$ rbenv init
  76. # Load rbenv automatically by appending
  77. # the following to ~/.bash_profile:
  78.  
  79. eval "$(rbenv init -)"
  80.  
  81. Rs-Mac-mini:~ mac$ cat .bash_profile
  82. # my bash profile
  83. echo "Running ... .bash_profile"
  84.  
  85.  
  86. Rs-Mac-mini:~ mac$ rbenv install 2.4.2
  87. ruby-build: use openssl from homebrew
  88. Downloading ruby-2.4.2.tar.bz2...
  89. -> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.2.tar.bz2
  90. Installing ruby-2.4.2...
  91. Installed ruby-2.4.2 to /Users/mac/.rbenv/versions/2.4.2
  92.  
  93. Rs-Mac-mini:~ mac$ rbenv global 2.4.2
  94. Rs-Mac-mini:~ mac$ ls -l
  95. total 0
  96. drwx------+ 5 mac staff 170 Jan 21 23:48 Desktop
  97. drwx------+ 3 mac staff 102 Jan 7 13:26 Documents
  98. drwx------+ 3 mac staff 102 Jan 7 13:26 Downloads
  99. drwx------@ 53 mac staff 1802 Jan 21 23:48 Library
  100. drwx------+ 3 mac staff 102 Jan 7 13:26 Movies
  101. drwx------+ 3 mac staff 102 Jan 7 13:26 Music
  102. drwx------+ 3 mac staff 102 Jan 7 13:26 Pictures
  103. drwxr-xr-x+ 5 mac staff 170 Jan 7 13:26 Public
  104. Rs-Mac-mini:~ mac$ ls -la
  105. total 16
  106. drwxr-xr-x+ 16 mac staff 544 Jan 22 00:14 .
  107. drwxr-xr-x 5 root admin 170 Jan 7 13:26 ..
  108. -r-------- 1 mac staff 7 Jan 7 13:26 .CFUserTextEncoding
  109. drwx------ 2 mac staff 68 Jan 21 19:22 .Trash
  110. -rw-r--r-- 1 mac staff 53 Jan 22 00:11 .bash_profile
  111. drwx------ 3 mac staff 102 Jan 21 23:21 .bash_sessions
  112. drwxr-xr-x 5 mac staff 170 Jan 22 00:21 .rbenv
  113. drwxr-xr-x 6 mac staff 204 Jan 22 00:14 .subversion
  114. drwx------+ 5 mac staff 170 Jan 21 23:48 Desktop
  115. drwx------+ 3 mac staff 102 Jan 7 13:26 Documents
  116. drwx------+ 3 mac staff 102 Jan 7 13:26 Downloads
  117. drwx------@ 53 mac staff 1802 Jan 21 23:48 Library
  118. drwx------+ 3 mac staff 102 Jan 7 13:26 Movies
  119. drwx------+ 3 mac staff 102 Jan 7 13:26 Music
  120. drwx------+ 3 mac staff 102 Jan 7 13:26 Pictures
  121. drwxr-xr-x+ 5 mac staff 170 Jan 7 13:26 Public
  122. Rs-Mac-mini:~ mac$ cat .bash_profile
  123. # my bash profile
  124. echo "Running ... .bash_profile"
  125.  
  126.  
  127. Rs-Mac-mini:~ mac$ nano hello.rb
  128. Rs-Mac-mini:~ mac$ ls
  129. Desktop Downloads Movies Pictures hello.rb
  130. Documents Library Music Public
  131. Rs-Mac-mini:~ mac$ ./hello.rb
  132. -bash: ./hello.rb: Permission denied
  133. Rs-Mac-mini:~ mac$ chmod 777 hello.rb
  134. Rs-Mac-mini:~ mac$ ./hello.rb
  135. -bash: ./hello.rb: /bin/ruby: bad interpreter: No such file or directory
  136. Rs-Mac-mini:~ mac$ ruby hello.rb
  137. Hello, World!
  138. Rs-Mac-mini:~ mac$ which ruby
  139. /usr/bin/ruby
  140. Rs-Mac-mini:~ mac$ ruby -v
  141. ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
  142. Rs-Mac-mini:~ mac$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement