• Stars
    star
    109
  • Rank 319,077 (Top 7 %)
  • Language
    Ruby
  • License
    MIT License
  • Created almost 11 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Introduction  

The JohnHenry Rails toolkit is meant to take care of all the menial tasks of launching a Rails application, that are largely the same from application to application. Using JohnHenry, you'll have the sample project live on a Heroku subdomain of your choosing (e.g. johnhenryrails.herokuapp.com) in under ten minutes, even if you don't know anything about Ruby on Rails!

Once you've launched your application, you can easily customize it to be a landing page to collect emails for a new product. And when you've got a feature you want users to pay for, JohnHenry's payment form is ready for you to use.

If you're already a Ruby on Rails expert, JohnHenry still provides value. It's step 2 after rails new MyProject. Save 1-2 weeks of boilerplate development setting up Bootstrap, Devise, Stripe, etc and concentrate on building the product you want to build!

Technologies Included

The following libraries and technologies are configured by JohnHenry and work out of the box:

  • Devise for user authentication / management
  • Stripe (JS, Gem) for handling payments
  • Bootstrap 3
  • HAML
  • SCSS
  • jQuery
  • Heroku-ready

Screenshots and Demo

Screenshot

A brand new Rails 4 project with just JohnHenry is live at: http://www.johnhenryrails.com This is exactly what you will end up with after installing.

Installation screencast

Using the install script makes the process very easy. If you're still not convinced, watch this video of launching a brand new JohnHenry installation in under three minutes: Screenshot

Installation on Mac OS X

.. and probably Linux

All commands are run via Terminal, which you can find in your Applications folder. If you're already using Terminal, try switching to iTerm and see if you like it any better. Other version controls may work, but it's assumed the user is using git. I build git from source using brew.

Note: this assumes that you've already got Ruby 2.0 and a Rails 4.0+ gem installed. If you haven't, head over to http://rvm.io and then come back. You can verify both with:

$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
Adams-MacBook-Pro:~/src/johnhenry[master *+%]
$ rails -v
Rails 4.0.2

Basic Installation

  1. Download and run the install script: This assumes that you have the following commands available to you on your command line: rails, bundle, git, heroku.
export projectname="MyWebSiteName"

curl https://raw.github.com/derwiki/johnhenry/master/install.sh | bash -

Congratulations, you've now made something on the internet! Be sure to tell your mom.

Extended / Optional Setup

  1. Set up Google Analytics. You can sign up at: https://www.google.com/analytics/web/#management/Settings
heroku config:set \
GOOGLE_ANALYTICS_DOMAIN=sampleproject.herokuapp.com \
GOOGLE_ANALYTICS_UA=UA-56346779-1

If you want to track signups as a goal in Analytics (a good baseline), set up a goal where the goal URL is /signup=1, because after going through a new user flow will drop you at that URL.

  1. Google Webmaster Tools After setting up Google Analytics, it's easy to link to Webmaster tools: https://www.google.com/webmasters/tools/home?hl=en

  2. Set up Stripe keys

heroku config:set \
STRIPE_PUBLISHABLE_KEY=pk_zv4FnnuZ28LFHccVSajbQQaTxnaZl \
STRIPE_SECRET_KEY=lbVrAG8WhPb2cHG9ryBBi1psT4ZREpm8
  1. Add the free tier of SendGrid to enable user account emails:
heroku addons:add sendgrid:starter
heroku config:add [email protected]

Setting BCC_EMAILS will BCC the provided email with any email sent though JohnHenryMailer.

  1. Add pgbackups and take your first database backup:
heroku addons:add pgbackups
heroku pgbackups:capture

You can additionally schedule daily backups with Heroku's Scheduler:

heroku addons:add scheduler
heroku addons:open scheduler
  1. Set up a monitoring service. UptimeRobot.com gives you 50 free monitors. On Heroku, this has the added benefit of keeping your site active, so that your dyno never hibernates and you never get a slow request because the dyno was waking back up.

  2. Set up a staging instance

  3. (optional) Add a custom domain heroku domains:add www.johnhenryrails.com In your Registrar's host record configuration, you must add sampleproject.herokuapp.com. as a CNAME for your domain.

  4. Set up NewRelic

heroku addons:add newrelic:stark
echo "gem 'newrelic_rpm'" > Gemfile
bundle
curl https://gist.github.com/rwdaigle/2253296/raw/newrelic.yml > config/newrelic.yml
git add config/newrelic.yml Gemfile*
git commit -m "Set up NewRelic"
heroku config:set NEW_RELIC_APP_NAME="SampleProject"
git push heroku master
  1. Set up Google Adwords tracking: AdWord's support topic: https://support.google.com/adwords/answer/1722054?hl=en Screenshot At the end of the flow, you'll get a code snippet: Screenshot The google_conversion_id and google_conversion_label are what we care about. We're going to use those values to set environment variables that let our app know what identifiers to send to AdWords:
heroku config:set GOOGLE_CONVERSION_ID=1234 GOOGLE_CONVERSION_LABEL='abc'

To verify that tracking is working properly, go through your sign up flow and when you are dumped back on the homepage, view the page's source code. You should see a <!-- Google Code for signup Conversion Page --> HTML comment followed by the conversion snippet.

Contributing

Bug fixes are welcome as pull requests against master. If you have bigger ideas, please get in contact with me at [email protected].

License

MIT License

More Repositories

1

layoff-runbook

Being laid off can be overwhelming and it's easy to miss important tasks. This runbook will help make sure you stay on track.
916
star
2

llm-prompt-injection-filtering

Uses the ChatGPT model to determine if a user-supplied question is safe and filter out dangerous questions
Python
42
star
3

go-chatgpt

A Go CLI program sends a prompt to the ChatGPT API for several models, prints the generated response for each, and then sends all the responses to chatgpt-3.5-turbo to ask which is best.
Go
24
star
4

scripts

Repository of shell scripts that have made my life easier
Shell
10
star
5

ebook-search

Using OpenAI embeddings, create a semantic search engine for an ebook.
Python
8
star
6

dotfiles

my home dir .files
Shell
5
star
7

rails-dead-css

Run a report to find potentially dead stylesheet rules and unused files
Ruby
4
star
8

histogram

Accepts a series of newline separated values and prints an ascii histogram
Python
4
star
9

chatpage

A web page that uses ChatGPT prompting to modify its own markup.
Python
3
star
10

wiki

3
star
11

pyflowtrace

Python function call flow trace
Python
3
star
12

memorism

JavaScript
3
star
13

memorygame

HTML
2
star
14

presentation-seo

Presentation on SEO give at ApartmentList on 2/27
HTML
2
star
15

tpbrb

thepiratebay rb command line script
Ruby
2
star
16

epoll

my epoll test stuff
Python
2
star
17

singly-rails-api-demo

Basic Rails app that implements the Singly API
Ruby
2
star
18

WordiSMS

Text message / email based flashcard service
Python
2
star
19

redirect_tracker

Python
1
star
20

hinstagram

JavaScript
1
star
21

mynextmuni

At a glance muni data for my 3 favorite starting points
JavaScript
1
star
22

spreddit

1
star
23

dotvim

my ~/.vim folder
Vim Script
1
star
24

wordisms_flask

Python
1
star
25

pyat

Python
1
star
26

just10cards

Ruby
1
star
27

wordisms-bottle

Python
1
star
28

OpenScience

Vim Script
1
star
29

showoffyourmasterpiece

Ruby
1
star
30

lita-heroku-hackbot

Lita chatbot for Slack, ready to deploy to Heroku
Ruby
1
star
31

wordfinder

just kind of messing around to find "special" words in a web page using JavaScript
JavaScript
1
star
32

asanadoc

JavaScript
1
star
33

twhistogram

Simple Python script that builds a histogram of hour-of-the-day -> number of tweets. When do you tweet most often?
Python
1
star
34

pyratebay

simple command line tool for searching the pirate bay
Python
1
star
35

remotekeyboard

curses Python script that listens for local keystrokes and forwards them to X Windows using xdotool
Python
1
star
36

imp

ID3 management program
Python
1
star
37

prospersim

Simulator of returns on Prosper
Ruby
1
star
38

ding_koenig

Ding-Koenig implementation of fast set intersection in python
Python
1
star
39

web-page-test-dashboard

Web Page Test Dashboard, simple tool to collect WebPageTest runs over API
Ruby
1
star
40

thinglonger

Python
1
star
41

presentation-git

Using git effectively
JavaScript
1
star