Almost minimal Rails implementation

Do not merge yet.