| begin | |
| require "bundler/inline" | |
| rescue LoadError => e | |
| $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
| raise e | |
| end | |
| gemfile(true) do | |
| source "https://rubygems.org" |
| <meta name="viewport" content="width=1024, maximum-scale=1"> |
| upstream myapp_puma { | |
| server unix:/tmp/myapp_puma.sock fail_timeout=0; | |
| } | |
| # for redirecting to https version of the site | |
| server { | |
| listen 80; | |
| rewrite ^(.*) https://$host$1 permanent; | |
| } | |
| <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: --> | |
| <link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png"> | |
| <!-- For the iPad mini and the first- and second-generation iPad on iOS ≤ 6: --> | |
| <link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72-precomposed.png"> | |
| <!-- For the iPad mini and the first- and second-generation iPad on iOS ≥ 7: --> | |
| <link rel="apple-touch-icon-precomposed" sizes="76x76" href="apple-touch-icon-76x76-precomposed.png"> | |
| <!-- For iPhone with high-resolution Retina display running iOS ≤ 6: --> |
- Mina is a gem which is very simliar to Capistrano but much FASTER!
- See https://github.com/nadarei/mina for the gem
- See http://nadarei.co/mina/ for documentation
- See https://gist.github.com/jbonney/6257372 for a good example on configuring Mina
require 'mina/bundler'SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.
apt-get install sshpass
A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.
Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).
| # | |
| # Install the MYSQL driver | |
| # gem install mysql2 | |
| # | |
| # Ensure the MySQL gem is defined in your Gemfile | |
| # gem 'mysql2' | |
| # | |
| # And be sure to use new-style password hashing: | |
| # http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
| development: |