Skip to content

Instantly share code, notes, and snippets.

@thomasmckay
thomasmckay / gist:7086206
Last active December 26, 2015 03:29
engine db setup
reset katello db
% cd katello
% git checkout master
% script/katello-reset-dbs development .
init foreman db
% cd foreman
<comment out katello engine in bundler.d/Gemfile.local.rb>
@thomasmckay
thomasmckay / community-setup.py
Last active December 15, 2015 14:29
Mega Corporation katello setup
#!/usr/bin/env python
#
# ./mega-setup.py --url https://localhost:3000/katello --user admin --password admin --verbose
#
from optparse import OptionParser
import sys
import os
import random
import string
diff --git a/src/app/controllers/api/api_controller.rb b/src/app/controllers/api/api_controller.rb
index e2f336e..c9cfb80 100644
--- a/src/app/controllers/api/api_controller.rb
+++ b/src/app/controllers/api/api_controller.rb
@@ -136,7 +136,8 @@ class Api::ApiController < ActionController::Base
def render_exception(status_code, exception)
logger.error pp_exception(exception)
respond_to do |format|
- format.json { render :json => {:errors => [ exception.message ]}, :status => status_code }
+ #json has to be displayMessage for older RHEL 5.7 subscription managers