If you're seeing this error, try heroku ps:scale web=0
then import the database again and run heroku ps:scale web=1
afterwards. Found nothing on google for this error, so posting this gist with the solution that worked for me. Could have been a temporary error too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Socket} from "phoenix" | |
let socket = new Socket("/socket", { params: {} }) | |
socket.connect() | |
let channel = socket.channel("updates", {}) | |
channel.join() | |
// Reload the app if it's out of date when it joins the websocket | |
let revision = null |
Writing this down in case it's useful for someone.
The reason why my oculus had inverted positional tracking (when I lean in, it moved me backwards in the 3d scene) was that my camera cable was broken. Ensure the little blue light is on when using the rift.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule BroadcastChannel do | |
use Phoenix.Channel | |
def join(channel, auth_message, socket) do | |
socket = assign(socket, :client_version, auth_message["client_version"]) | |
ClientStats.join(channel, socket.assigns[:client_version]) | |
broadcast_stats | |
{:ok, socket} | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In this example we're running jobs of some kind, and waiting for events if they finish okay or fail. | |
defmodule JobEvent do | |
def start_link do | |
{:ok, pid} = GenEvent.start_link(name: __MODULE__) | |
end | |
defmodule MessageForwarder do | |
use GenEvent |
For us this turned out to be that we had cached html generated by the rails 3 app that had the ASCII-8BIT encoding, clearing all html caches fixed this.
To arrive at this, we first added this debug code:
# if you reuse this: ensure it matches the method in your version of rails
# as the method is overwritten by this monkeypatch
# config/initializers/debug_encoding_errors.rb
ActiveSupport::SafeBuffer
If you have a body like this:
payload={"data": "5 %"}
Then nginx will most likely give you a 400 bad request error.
To get around this, encode the json with "x-www-urlencoded" encoding.
A web framework like rails will transparently decode "x-www-urlencoded" for you.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rails | |
alias sc='bundle exec rails console' | |
alias ss="bundle exec rails server" | |
alias rs='rake spec' | |
alias rsu='rake spec:unit' | |
alias rsua='rake spec:unit:all' | |
alias rsa='rake spec:all' | |
alias mig='rake db:migrate' | |
alias rsp='rake testbot:spec' | |
alias ref='script/refresh' |