Skip to content

Instantly share code, notes, and snippets.

@jasonmelgoza
Last active August 29, 2015 13:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonmelgoza/10951328 to your computer and use it in GitHub Desktop.
Save jasonmelgoza/10951328 to your computer and use it in GitHub Desktop.
Vagrant ruby and node setup
Basic Vagrant Ruby/Node VM
# Install or use precise64
vagrant init precise64 http://files.vagrantup.com/precise64.box
or
vagrant init precise64
# Boot VM ans SSH
vagrant up
vagrant ssh
# Install dependencies
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev curl
# Install rbenv and Ruby
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source .bash_profile
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install 1.9.3-p545
rbenv global 1.9.3-p545
rbenv rehash
gem update --system
echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc
gem install bundler
gem install rails
rbenv rehash
# Install node and Yoeman
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
sudo npm install -g yo
# Verify installs
vagrant@precise64:~$ node -v
v0.10.26
vagrant@precise64:~$ ruby -v
ruby 1.9.3p545 (2014-02-24 revision 45159) [x86_64-linux]
vagrant@precise64:~$ yo -v
1.1.2
# Boom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment