-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix syntax api_controller for Heroku #193
Conversation
Alright, thank you for the info and sorry for the useless PR. I changed my Gemfile to point to https://github.com/owen2345/camaleon-cms and it works now. Because when fetching straight from rubygems, I still get this in class Api::ApiController < CamaleonController
#before_action -> { doorkeeper_authorize! :client }
def account
render json: current_user
end
def render_json_error(internal_message = 'Unexpected error', code = 100, status = 404, user_message = 'Unexpected error')
error = {
'userMessage': user_message,
'internalMessage': internal_message,
'code': code
}
render :json => error, :status => status
end
def render_json_ok(message = 'Success', status = 200, more_info = {})
msg = {
message: message,
more_info: more_info
}
render :json => msg, :status => status
end
end |
Yeah for now you need to point to master or a commit on master because the ruby gems version is broken. @owen2345 can you yank that release on ruby gems and add a new, good release? |
Hi @cmckni3 right now I will do it. |
Done! |
👍 Can you yank 1.0.8? http://help.rubygems.org/kb/gemcutter/removing-a-published-rubygem |
Actually, this PR also removed some (what I assume is debug) code in the Could this be removed from the main repo? |
Opened #199 |
fix syntax api_controller for Heroku
This should have been just closed but not a big deal. |
Error Stack on heroku:
[3] ! Unable to load application: SyntaxError: /app/vendor/bundle/ruby/2.1.0/gems/camaleon_cms-1.0.8/app/controllers/api/api_controller.rb:10: syntax error, unexpected ':', expecting =>
'userMessage': user_message,
^
/app/vendor/bundle/ruby/2.1.0/gems/camaleon_cms-1.0.8/app/controllers/api/api_controller.rb:11: syntax error, unexpected ':', expecting :: or '[' or '.'
'internalMessage': internal_message,
^
/app/vendor/bundle/ruby/2.1.0/gems/camaleon_cms-1.0.8/app/controllers/api/api_controller.rb:12: syntax error, unexpected ':', expecting :: or '[' or '.'
'code': code
^
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require': /app/vendor/bundle/ruby/2.1.0/gems/camaleon_cms-1.0.8/app/controllers/api/api_controller.rb:10: syntax error, unexpected ':', expecting => (SyntaxError)
'userMessage': user_message,
^
/app/vendor/bundle/ruby/2.1.0/gems/camaleon_cms-1.0.8/app/controllers/api/api_controller.rb:11: syntax error, unexpected ':', expecting :: or '[' or '.'
'internalMessage': internal_message,
^
/app/vendor/bundle/ruby/2.1.0/gems/camaleon_cms-1.0.8/app/controllers/api/api_controller.rb:12: syntax error, unexpected ':', expecting :: or '[' or '.'
'code': code