Heroku may not detect a correct buildpack for your JS dependencies, then you have to set it manually:
heroku buildpacks:add heroku/nodejs -i 1
heroku buildpacks:add --index 2 https://github.com/heroku/heroku-buildpack-ruby
# Create credentials json file | |
# 1. Go to Google API Console | |
# 2. Create credentials (Service Account Key). Note 'Service account ID' | |
# 3. Download key as 'google_auth.json' | |
# 4. Go to Google Analytics -> Admin -> View Settings. Note 'View ID' | |
# 5. Go to User Management -> Add permissions for: (Service account ID) [Read & Analyze] | |
# Terminal | |
export GOOGLE_APPLICATION_CREDENTIALS='config/google_auth.json' |
It's important to note that running this reset will drop any existing data you have in the application
heroku restart
heroku pg:reset DATABASE
(no need to change the DATABASE
)heroku run rake db:migrate
heroku run rake db:seed
(if you have seed)One liner
This guide assumes that you recently run brew upgrade postgresql
and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.
First let's check something.
brew info postgresql
The top of what gets printed as a result is the most important:
1) In your terminal, open the file using vim: | |
vim file_name | |
2) Remove all BOM characters: | |
:set nobomb | |
3) Save the file: | |
:wq |
class ApplicationController < ActionController::Base | |
around_filter :set_white_label | |
private | |
def set_white_label | |
subdomains = request.subdomains - RESERVED_SUBDOMAINS | |
if subdomains.empty? | |
yield | |
return |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |