Created
July 11, 2013 17:05
-
-
Save ychubachi/5977267 to your computer and use it in GitHub Desktop.
Chefを新しくしてrbenvをberkshellでvagrantのUbuntuにインストール ref: http://qiita.com/ychubachi@github/items/befe8ab4cd0765643628
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
diff --git a/Berksfile b/Berksfile | |
index 6d86dcf..b4fe769 100644 | |
--- a/Berksfile | |
+++ b/Berksfile | |
@@ -2,3 +2,5 @@ site :opscode | |
metadata | |
cookbook 'git' | |
+cookbook 'ruby_build' | |
+cookbook 'rbenv', github: "fnichol/chef-rbenv" |
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
$ vagrant plugin install vagrant-omnibus | |
Installing the 'vagrant-omnibus' plugin. This can take a few minutes... | |
Installed the plugin 'vagrant-omnibus (1.1.0)'! |
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
$ vagrant plugin list | |
vagrant-berkshelf (1.3.2) | |
vagrant-omnibus (1.1.0) |
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
$ vagrant provision |
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
$ vagrant ssh | |
vagrant@precise:~$ rbenv versions | |
system | |
* 2.0.0-p195 (set by /home/vagrant/.rbenv/version) | |
vagrant@precise:~$ ruby -v | |
ruby 2.0.0p195 (2013-05-14 revision 40734) [i686-linux] |
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
diff --git a/Vagrantfile b/Vagrantfile | |
index e3a5d5d..87555d2 100644 | |
--- a/Vagrantfile | |
+++ b/Vagrantfile | |
@@ -77,12 +77,26 @@ Vagrant.configure("2") do |config| | |
:server_root_password => 'rootpass', | |
:server_debian_password => 'debpass', | |
:server_repl_password => 'replpass' | |
+ }, | |
+ rbenv: { | |
+ user_installs: [{ | |
+ user: "vagrant", | |
+ rubies: ["2.0.0-p195"], | |
+ global: "2.0.0-p195", | |
+ gems: { | |
+ "2.0.0-p195" => [ | |
+ {name: "bundler"} | |
+ ] | |
+ } | |
+ }] | |
} | |
} | |
chef.run_list = [ | |
"recipe[precise::default]", | |
- "git" | |
+ "git", | |
+ "ruby_build", | |
+ "rbenv::user" | |
] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment