- Install VirtualBox https://www.virtualbox.org/
- Install Vagrant https://www.vagrantup.com/
- Install Git for Windows https://git-scm.com/download/win - this will also install MinGW shell
To run shell, press the Windows Key and run git bash
To run shell, press the Windows Key and run git bash
You may run into probelms like this:
Building native extensions. This could take a while...
ERROR: Error installing maxmind_geoip2:
ERROR: Failed to build gem native extension.
current directory: /Users/leonardteo/.rvm/gems/ruby-2.1.6@artstation/gems/maxmind_geoip2-0.0.8/ext/maxmind_geoip2
/Users/leonardteo/.rvm/rubies/ruby-2.1.6/bin/ruby -r ./siteconf20161227-1647-1c4uejw.rb extconf.rb
checking for maxminddb.h... no
<script src="//cdnjs.cloudflare.com/ajax/libs/fitvids/1.0.1/jquery.fitvids.min.js"></script> | |
<script> | |
Discourse.PostView.reopen({ | |
didInsertElement : function(){ | |
this._super(); | |
var $post = this.$(); | |
$post.fitVids(); | |
} | |
}); | |
</script> |
#!/bin/bash | |
# sidekiq Init script for Sidekiq | |
# chkconfig: 345 100 75 | |
# | |
# Description: Starts and Stops Sidekiq message processor for Stratus application. | |
# | |
# User-specified exit parameters used in this script: | |
# | |
# Exit Code 5 - Incorrect User ID | |
# Exit Code 6 - Directory not found |
== Slim::Template.new("#{File.dirname(__FILE__)}/header.slim").render |
# Endless Rails application template | |
# For use with v1.0.3 | |
# | |
# This should be copied to https://gist.github.com/leonardteo/8263273 | |
# | |
# Usage: | |
# rails new [app name] -m https://gist.github.com/leonardteo/8263273/raw/endless-app-template.rb | |
# Front-end gems | |
gem 'slim' |
def assets_changed? | |
from = source.next_revision(current_revision) | |
asset_dirs = "app/assets/" | |
capture("cd #{latest_release} && #{source.local.log(from)} #{asset_dirs} | wc -l").to_i > 0 | |
end | |
namespace :deploy do | |
namespace :assets do | |
task :precompile, roles: :web do | |
is_first_deploy = !remote_file_exists?(File.join(current_path, "REVISION")) |
#!/bin/bash | |
# PATH | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
# Store the base dir | |
BASEDIR=$( cd $(dirname $0); pwd) | |
# Get all dependencies | |
sudo apt-get update |
#!/bin/bash | |
curl -L https://get.rvm.io | sudo bash -s stable | |
usermod -a -G rvm ubuntu # 'ubuntu' is the default admin user | |
sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config | |
source /usr/local/rvm/scripts/rvm | |
rvmsudo rvm install 1.9.3 | |
rvm --default use 1.9.3 |
# Sets up and runs a simple Rack server using WEBrick | |
require 'rack' | |
class HelloWorld | |
def call(env) | |
[200, {"Content-Type" => "text/html"}, ["Hello Rack!"]] | |
end | |
end | |
Rack::Server.start(:app => HelloWorld.new, :Port => 9292, :server => 'WEBrick') |