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
import { useEffect, useState } from "react"; | |
class EventBus<T> { | |
_handlers: Set<(t: T) => void> = new Set(); | |
subscribe(handler: (t: T) => void) { | |
this._handlers.add(handler); | |
} | |
unsubscribe(handler: (t: T) => void) { | |
this._handlers.delete(handler); | |
} |
Let's put an end to datepicker suffering! Follow this steps to have your shiny new datepicker working in no time! (and remind yourselves of JS plugins in Rails)
Note: We recommend using Bootstrap Datepicker (try your own luck with anything different and remember, jQuery-UI's datepicker sucks, don't use it). These are the only three links you need:
// default exports
export default 42;
export default {};
export default [];
export default (1 + 2);
export default foo;
export default function () {}
export default class {}
export default function foo () {}
build: | |
steps: | |
- script: | |
name: install yarn | |
code: npm install -g yarn | |
- script: | |
name: report yarn version | |
code: yarn --version | |
- script: | |
name: set yarn cache |
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:
module ImagesHelper | |
# Example usage: | |
# | |
# image_set_tag_3x "foo_1x.png", alt: "foo" | |
# | |
# Will assume there is a 2x and 3x version and provide those automagically. | |
# | |
# Based on https://gist.github.com/mrreynolds/4fc71c8d09646567111f | |
def image_set_tag_3x(source, options = {}) | |
srcset = [ 2, 3 ].map { |num| |
=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') |