Last active
February 11, 2019 16:39
-
-
Save colinrubbert/45e34abd250f42484a6f8413ff0a50f3 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Script file for install Ruby, Rails, and | |
# other web development features for new system | |
# setups. This is most focused for Bash on Windows | |
# so there will not be sql dbs installed with | |
# this script. | |
# Update packages & Install Pre-requisite packages | |
sudo apt-get update | |
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 libffi-dev postgresql-client-common postgresql-client libpq-dev software-properties-common nodejs yarn | |
# Ruby Version 2.6.1 (using Rbenv) | |
# Install rbenv | |
cd | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL | |
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc | |
exec $SHELL | |
# Install Ruby and set global | |
rbenv install 2.6.1 | |
rbenv global 2.6.1 | |
ruby -v | |
# Install Bundler | |
gem install bundler | |
# Rehash gems to update pointers | |
rbenv rehash | |
# Setup and configure git | |
# Configure Git (change this to your specific settings) | |
git config --global color.ui true | |
git config --global user.name "Colin Rubbert" | |
git config --global user.email "[email protected]" | |
ssh-keygen -t rsa -b 4096 -C "[email protected]" | |
# Install Rails 5 & Pre-requisite | |
# Install Rails 5 | |
gem install rails | |
# Rehash gems | |
rbenv rehash | |
# Check version | |
rails -v | |
# Show generated SSH key that will need to be added to Github | |
cat ~/.ssh/id_rsa.pub | |
echo 'Copy & Paste this snippet to Github' | |
pause | |
# Test to make sure everything works | |
ssh -T [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Windows Webdev Environment Script
This is an installation script for the new Windows Linux Subsystem w/Ubuntu 14.04.
This will install a basic environment for Ruby, Rails, and Git for Windows