Last active
August 29, 2015 14:13
-
-
Save Altons/cc7da37eea2ef1f1fd30 to your computer and use it in GitHub Desktop.
Ubuntu Rails
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
#!/usr/bin/env bash | |
# Update sources: | |
sudo apt-get -y update | |
# Install development tools: | |
sudo apt-get -y install build-essential | |
# Packages required for compilation of some stdlib modules | |
sudo apt-get -y install tklib | |
# Extras for RubyGems and Rails: | |
sudo apt-get -y install zlib1g-dev libssl-dev | |
# Readline Dev on Ubuntu: | |
sudo apt-get -y install libreadline-gplv2-dev | |
# Install some nokogiri dependencies: | |
sudo apt-get -y install libxml2 libxml2-dev libxslt1-dev | |
# Install Git | |
sudo apt-get -y install git-core | |
# Install Sqlite | |
sudo apt-get -y install sqlite3 libsqlite3-dev | |
# Install Make | |
sudo apt-get -y install make | |
# Install NodeJS (Required for Rails) | |
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository -y ppa:chris-lea/node.js | |
sudo apt-get -y update | |
sudo apt-get -y install curl nodejs | |
# Install Heroku Toolbelt | |
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh | |
# Install RBENV | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
touch ~/.bash_profile | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
source ~/.bash_profile | |
# Install Ruby 2.1.5 | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
cd ~/.rbenv/plugins/ruby-build | |
sudo ./install.sh | |
rbenv install 2.1.5 | |
rbenv rehash | |
rbenv global 2.1.5 | |
# Install gems for Rails | |
# gem install rdoc | |
gem install bundler | |
# gem install rake | |
gem install sqlite3 -v '1.3.9' | |
gem install rails | |
rbenv rehash |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "precise64" | |
config.vm.provision :shell, path: "rails.sh", privileged: false | |
# config.vm.network :private_network, ip: "192.168.55.56" | |
config.vm.network :forwarded_port, guest: 3000, host: 3000 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment