-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit of #budapest.rb RVM slides
- Loading branch information
0 parents
commit 6849846
Showing
16 changed files
with
445 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rvm use 1.8.7@showoff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
!SLIDE incremental commandline center | ||
# actions | ||
$ cat version.rb | ||
puts "Hello, I am #{RUBY_VERSION}" | ||
|
||
$ rvm 1.8.7,1.9.1 ruby version.rb | ||
ruby-1.8.7-p249: ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin10.2.0] | ||
Hello, I am 1.8.7 | ||
ruby-1.9.1-p378: ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.3.0] | ||
Hello, I am 1.9.1 | ||
|
||
$ rvm ruby version.rb | ||
|
||
$ rvm 1.8.7,1.9.1 gem install rspec json --no-rdoc | ||
$ rvm rake spec | ||
$ rvm monitor | ||
$ rvm --json specs | ||
$ rvm --yaml tests | ||
$ rvm benchmark loop.rb | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
!SLIDE incremental commandline center | ||
# gemsets (create and use) | ||
|
||
$ rvm 1.9.1 | ||
$ rvm gemset create rails3 | ||
Gemset 'rails3' created. | ||
$ rvm gemset use rails3 | ||
Now using gemset 'rails3' | ||
$ rvm use 1.9.1@rails3 | ||
Using ruby 1.9.1 p378 with gemset rails3 | ||
|
||
$ gem install rails --pre | ||
... | ||
$ gem list | grep rails | ||
rails (3.0.0.beta3) | ||
|
||
$ rvm 1.9.1 | ||
$ gem list | ||
|
||
*** LOCAL GEMS *** | ||
|
||
rake (0.8.7) | ||
rdoc (2.5.3) | ||
|
||
!SLIDE incremental commandline center small | ||
# gemsets (list) | ||
|
||
$ rvm 1.9.1@rails3 | ||
|
||
$ rvm gemset name | ||
rails3 | ||
|
||
$ rvm gemset list | ||
gemsets : for ruby-1.9.1-p378 (found in /Users/rgabo/.rvm/gems/) | ||
global | ||
rails3 | ||
|
||
$ rvm gemdir | ||
/Users/rgabo/.rvm/gems/ruby-1.9.1-p378@rails3 | ||
|
||
$ rvm 1.9.1@global; rvm gemdir | ||
/Users/rgabo/.rvm/gems/ruby-1.9.1-p378@global | ||
|
||
$ rvm 1.9.1; rvm gemdir | ||
/Users/rgabo/.rvm/gems/ruby-1.9.1-p378 | ||
|
||
!SLIDE incremental commandline center small | ||
# gemsets (delete and empty) | ||
|
||
$ rvm gemset delete rails3 | ||
Are you SURE you wish to remove the entire gemset directory 'rails3' | ||
(/Users/rgabo/.rvm/gems/ruby-1.9.1-p378@rails3)? | ||
(anything other than 'yes' will cancel) > | ||
|
||
$ rvm gemset empty rails3 | ||
Are you SURE you wish to remove the installed gemset for gemset | ||
'ruby-1.9.1-p378' (/Users/rgabo/.rvm/gems/ruby-1.9.1-p378)? | ||
(anything other than 'yes' will cancel) > | ||
|
||
$ rvm --force gemset delete rails3 | ||
|
||
!SLIDE incremental commandline center small | ||
# gemsets (export, import, copy) | ||
|
||
$ rvm 1.9.1@rails3 | ||
$ rvm gemset export rails3.gems | ||
Exporting current environments gemset to rails3.gems | ||
|
||
$ cat rails3.gems | ||
# rails3.gems generated gem export file. | ||
abstract -v1.0.0 | ||
actionmailer -v3.0.0.beta3 | ||
actionpack -v3.0.0.beta3 | ||
activemodel -v3.0.0.beta3 | ||
activerecord -v3.0.0.beta3 | ||
activeresource -v3.0.0.beta3 | ||
activesupport -v3.0.0.beta3 | ||
arel -v0.3.3 | ||
... | ||
rails -v3.0.0.beta3 | ||
|
||
$ rvm --force gemset empty rails3 | ||
$ rvm 1.9.1@rails3 gemset import rails3 | ||
Importing rails3.gems file... | ||
abstract 1.0.0 is not installed, installing... | ||
... | ||
|
||
$ rvm gemset copy 1.9.1@rails3 1.9.2-head@rails3 | ||
|
||
!SLIDE incremental commandline center | ||
# gemsets (global) | ||
|
||
$ rvm 1.9.1@global gem install github | ||
ruby-1.9.1-p378: ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.3.0] | ||
github is not installed, installing... | ||
github installed. | ||
|
||
$ rvm use 1.9.1@rails3 | ||
Using ruby 1.9.1 p378 with gemset rails3 | ||
|
||
$ which github | ||
/Users/rgabo/.rvm/gems/ruby-1.9.1-p378@global/bin/github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
!SLIDE center incremental commandline smaller | ||
|
||
# usage and info | ||
|
||
$ rvm [usage] | ||
Usage | ||
|
||
rvm Action [Implementation] [Flags] [Options] | ||
|
||
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 | ||
info - show information for current ruby | ||
install - install one or many ruby versions | ||
$ rvm info | ||
system: | ||
... | ||
|
||
rvm: | ||
... | ||
|
||
ruby: | ||
... | ||
homes: | ||
... | ||
|
||
binaries: | ||
... | ||
|
||
environment: | ||
... | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
!SLIDE incremental commandline small | ||
|
||
# install | ||
|
||
$ rvm install 1.9.1 | ||
Installing Ruby from source to: /Users/rgabo/.rvm/rubies/ruby-1.9.1-p378 | ||
Extracting ruby-1.9.1-p378 ... | ||
Configuring ruby-1.9.1-p378, this may take a while depending on your cpu(s)... | ||
Compiling ruby-1.9.1-p378, this may take a while, depending on your cpu(s)... | ||
Installing ruby-1.9.1-p378 | ||
Installation of ruby-1.9.1-p378 is complete. | ||
|
||
$ rvm install 1.8.7-p160 | ||
$ rvm install ruby-head | ||
$ rvm install 1.9.1 -C --enable-shared,--with-readline-dir=$HOME/.rvm/usr | ||
$ rvm install ree --ree-options --no-tcmalloc | ||
|
||
$ rvm --default 1.8.7 | ||
$ rvm list | ||
|
||
rvm Rubies | ||
|
||
ree-1.8.7-2010.01 [ x86_64 ] | ||
=> ruby-1.8.7-p249 [ x86_64 ] | ||
ruby-1.9.1-p378 [ x86_64 ] | ||
|
||
Default Ruby (for new shells) | ||
|
||
ruby-1.8.7-p249 [ x86_64 ] | ||
|
||
System Ruby | ||
|
||
system [ x86_64 i386 ppc ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
!SLIDE center incremental smbullets | ||
|
||
# Prerequisites | ||
|
||
* standard *nix tools (bash, awk, sed, etc.) | ||
* git (for updating RVM itself and for installing head versions of rubies) | ||
* subversion (for installing head versions of rubies) | ||
|
||
* **Mac OS X (Snow Leopard)** | ||
|
||
* XCode 3.2.1 or later | ||
* LLVM for MacRuby | ||
* JDK for JRuby | ||
* Mono for IronRuby | ||
|
||
!SLIDE center incremental smbullets | ||
|
||
# Installing RVM | ||
|
||
* **install from the GitHub repository** | ||
* install from the latest source tarball | ||
* install from a gem | ||
|
||
!SLIDE incremental commandline smaller | ||
|
||
# Install from the GitHub repository | ||
|
||
$ bash < <(curl http://rvm.beginrescueend.com/releases/rvm-install-head) | ||
% Total % Received % Xferd Average Speed Time Time Time Current | ||
Dload Upload Total Spent Left Speed | ||
116 349 116 349 0 0 856 0 --:--:-- --:--:-- --:--:-- 1727 | ||
Initialized empty Git repository in /Users/rgabo/.rvm/src/rvm/.git/ | ||
remote: Counting objects: 2045, done. | ||
remote: Compressing objects: 100% (928/928), done. | ||
remote: Total 2045 (delta 1195), reused 1478 (delta 696) | ||
Receiving objects: 100% (2045/2045), 483.95 KiB | 174 KiB/s, done. | ||
Resolving deltas: 100% (1195/1195), done. | ||
|
||
RVM - shell scripts which allow management of multiple ruby interpreters and environments. | ||
|
||
RTFM: http://rvm.beginrescueend.com/ | ||
|
||
HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net) | ||
|
||
******************************************************************************** | ||
* Installing rvm to /Users/rgabo/.rvm/ | ||
******************************************************************************** | ||
|
||
$ echo "if [[ -s ~/.rvm/scripts/rvm ]]; then source ~/.rvm/scripts/rvm; fi" >> ~/.bashrc | ||
$ echo "if [[ -s ~/.bashrc ]]; then source ~/.bashrc ; fi" >> ~/.bash_profile |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
!SLIDE center | ||
|
||
## **Ruby Version Manager (RVM)** | ||
|
||
### **Gabor Ratky (@rgabo)** | ||
### [email protected] | ||
### [http://rgabostyle.com](http://rgabostyle.com) | ||
|
||
!SLIDE smbullets incremental | ||
# Great things about RVM | ||
|
||
* it simplifies development, testing and production deployment | ||
* it's a command-line tool | ||
* it's completely self-contained | ||
* it encourages non-root usage | ||
* it comes with chunky bacon | ||
|
||
!SLIDE incremental commandline smaller | ||
## Before RVM (Mac OS X Snow Leopard) | ||
|
||
$ which ruby | ||
/usr/bin/ruby | ||
|
||
$ ruby --version | ||
ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0] | ||
|
||
$ gem env | ||
RubyGems Environment: | ||
- RUBYGEMS VERSION: 1.3.0 | ||
- RUBY VERSION: 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0] | ||
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8 | ||
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/... | ||
- EXECUTABLE DIRECTORY: /usr/bin | ||
- GEM PATHS: | ||
- /Library/Ruby/Gems/1.8 | ||
- /Users/rgabo/.gem/ruby/1.8 | ||
- /System/Library/Frameworks/Ruby.framework/... | ||
$ gem install thor | ||
WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and /usr/bin | ||
arent both writable. | ||
WARNING: You dont have /Users/rgabo/.gem/ruby/1.8/bin in your PATH, | ||
gem executables will not run. | ||
|
||
ERROR: While executing gem ... (Gem::FilePermissionError) | ||
You dont have write permissions into the /usr/bin directory. | ||
|
||
!SLIDE incremental smbullets center | ||
|
||
# Possible solutions | ||
|
||
* use sudo to install gems with executables (FAIL) | ||
* set GEM_HOME to user-writable directory (e.g. /usr/local/gems) | ||
* install gems to and run executable from ~/.gem | ||
* Homebrew + Brewbygems | ||
* ... | ||
|
||
!SLIDE center | ||
|
||
# or | ||
|
||
!SLIDE incremental smbullets center | ||
|
||
# RVM | ||
|
||
 | ||
|
||
!SLIDE smbullets incremental | ||
|
||
# RVM | ||
|
||
* install and work with multiple Ruby interpreters | ||
* create and use separate named gem sets | ||
* create self-contained and dedicated environments for each project | ||
* test, rake, benchmark and gem against multiple Ruby versions | ||
* never leave user space (no sudo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
!SLIDE smbullets | ||
|
||
# RVM Resources # | ||
|
||
* Homepage: [http://rvm.beginrescueend.com](http://rvm.beginrescueend.com) | ||
* GitHub: [http://github.com/wayneeseguin/rvm](http://github.com/wayneeseguin/rvm) | ||
* Pivotal Tracker: [https://www.pivotaltracker.com/projects/26822](https://www.pivotaltracker.com/projects/26822) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.floated-image img { | ||
float: left; | ||
margin-right: 2em; | ||
} | ||
|
||
.floated-image:after { | ||
content: "."; | ||
display: block; | ||
clear: both; | ||
visibility: hidden; | ||
line-height: 0; | ||
height: 0; | ||
} | ||
|
||
.floated-image { | ||
display: inline-block; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
var lastHash = null; | ||
|
||
function setHash() { | ||
lastHash = '#' + (slidenum+1); | ||
location.hash = slidenum+1; | ||
} | ||
|
||
var originalShowSlide = showSlide; | ||
|
||
var showSlide = function(back_step) { | ||
originalShowSlide(back_step); | ||
setHash(slidenum); | ||
} | ||
|
||
function showFirstSlide() { | ||
if (location.hash && !isNaN(parseInt(location.hash.substr(1)))) { | ||
checkHash(); | ||
} else { | ||
slidenum = 0; | ||
showSlide(); | ||
} | ||
setInterval(checkHash, 100); | ||
} | ||
|
||
function checkHash() { | ||
if (location.hash && location.hash != lastHash) { | ||
var hashValue = parseInt(location.hash.substr(1)); | ||
if (!isNaN(hashValue) && hashValue != slidenum+1) { | ||
slidenum = hashValue-1; | ||
showSlide(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# showoff.gems generated gem export file. Note that any env variable settings will be missing. Append these after using a ';' field separator | ||
bluecloth -v2.0.7 | ||
gli -v1.1.0 | ||
mg -v0.0.8 | ||
rack -v1.1.0 | ||
showoff -v0.1.4 | ||
sinatra -v1.0 |
Oops, something went wrong.