Created
October 22, 2015 06:34
-
-
Save adusak/7927b6f57463d7bbc631 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.configure(2) do |config| | |
| config.vm.box = "ubuntu/trusty64" | |
| # NASTAVIT VLASTNÍ SLOŽKU S PROJEKTEM | |
| config.vm.synced_folder "../../Workspace/Ruby", "/vagrant_data" | |
| $sudoscript = <<-SHELL | |
| sudo apt-get update -y | |
| sudo apt-get install openssl git -y | |
| sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev -y | |
| sudo apt-get install nodejs -y | |
| SHELL | |
| $userscript = <<-SHELL | |
| cd ~ | |
| git clone git://github.com/sstephenson/rbenv.git .rbenv | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
| echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
| git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
| echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile | |
| source ~/.bash_profile | |
| rbenv install 2.2.3 | |
| rbenv global 2.2.3 | |
| gem install bundler | |
| gem install pry | |
| gem install rails | |
| SHELL | |
| config.vm.provision "shell", inline: $sudoscript | |
| config.vm.provision "shell", inline: $userscript, privileged: false | |
| config.vm.network :forwarded_port , guest: 80, host: 8080 | |
| config.vm.network :forwarded_port , guest: 3000, host: 3001 | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment