Skip to content

Instantly share code, notes, and snippets.

@puppycodes
Last active April 4, 2017 12:08
Show Gist options
  • Save puppycodes/16092d20e1bcd4d3ced242cf341a52be to your computer and use it in GitHub Desktop.
Save puppycodes/16092d20e1bcd4d3ced242cf341a52be to your computer and use it in GitHub Desktop.
scumblr
apt-get update
apt-get -y install git curl redis-server libxslt-dev libxml2-dev libyaml-dev build-essential bison openssl zlib1g libxslt1.1 libssl-dev libxslt1-dev libxml2 libffi-dev libxslt-dev autoconf libc6-dev libreadline6-dev zlib1g-dev libtool libsqlite3-dev libcurl3 libmagickcore-dev libmagickwand-dev imagemagick
sudo aptitude purge ruby
wget -O - https://get.rvm.io | bash
rvm requirements
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
rvm install ruby-2.1.2
rvm use 2.1.2
rvm rubygems current
gem install bundler --no-ri --no-rdoc
gem install rails -v 4.0.9 --no-ri --no-rdoc
gem install sidekiq --no-ri --no-rdoc
cd /vagrant
git clone https://github.com/Netflix/Scumblr.git
cd Scumblr
bundle install
rake db:create
rake db:schema:load
# user = User.new
# user.email = "admin@localhost.com"
# user.password = "root"
# user.password_confirmation = "root"
# user.admin = true
# user.save
redis-server &
bundle exec rails s &
echo '----------------------------------------------' >> /etc/motd
echo 'Welcome! We have already set up a base box for' >> /etc/motd
echo 'you, but there is still config yet to be done.' >> /etc/motd
echo 'You need to go into /vagrant/Scrumblr and make' >> /etc/motd
echo 'an admin user. See http://bit.ly/1oqdwFU ' >> /etc/motd
echo '----------------------------------------------' >> /etc/motd
# -*- 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|
config.vm.box = "hashicorp/precise64"
config.vm.provision :shell, path: "bootstrap.sh"
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