Skip to content

Instantly share code, notes, and snippets.

@Sovietaced
Created October 7, 2014 02:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sovietaced/973c4f24d05ac72c1926 to your computer and use it in GitHub Desktop.
Save Sovietaced/973c4f24d05ac72c1926 to your computer and use it in GitHub Desktop.
Rails Admin
Stacktrace:
, [2014-10-07T02:00:24.360586 #13077] INFO -- : Started GET "/admin/subscription" for 173.227.38.50 at 2014-10-07 02:00:24 +0000
I, [2014-10-07T02:00:24.362749 #13077] INFO -- : Processing by RailsAdmin::MainController#index as HTML
I, [2014-10-07T02:00:24.362832 #13077] INFO -- : Parameters: {"model_name"=>"subscription"}
E, [2014-10-07T02:00:24.382861 #13077] ERROR -- : Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc LIMIT 20 OFFSET 0' at line 1: SELECT `subscriptions`.* FROM `subscriptions` ORDER BY subscriptions. desc LIMIT 20 OFFSET 0
I, [2014-10-07T02:00:24.384894 #13077] INFO -- : Rendered /var/www/hosted-trial/shared/bundle/ruby/2.0.0/gems/rails_admin-0.6.0/app/views/rails_admin/main/index.html.haml within layouts/rails_admin/application (13.8ms)
I, [2014-10-07T02:00:24.385148 #13077] INFO -- : Completed 500 Internal Server Error in 22ms
F, [2014-10-07T02:00:24.393284 #13077] FATAL -- :
ActionView::Template::Error (Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc LIMIT 20 OFFSET 0' at line 1: SELECT `subscriptions`.* FROM `subscriptions` ORDER BY subscriptions. desc LIMIT 20 OFFSET 0):
118: %th.other.right.shrink= "..."
119: %th.last.shrink
120: %tbody
121: - @objects.each do |object|
122: %tr{:class => "#{@abstract_model.param_key}_row"}
123: %td
124: = check_box_tag "bulk_ids[]", object.id, false
activerecord (4.0.0) lib/active_record/connection_adapters/abstract_mysql_adapter.rb:286:in `query'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract_mysql_adapter.rb:286:in `block in execute'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract_adapter.rb:425:in `block in log'
activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract_adapter.rb:420:in `log'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract_mysql_adapter.rb:286:in `execute'
activerecord (4.0.0) lib/active_record/connection_adapters/mysql2_adapter.rb:220:in `execute'
activerecord (4.0.0) lib/active_record/connection_adapters/mysql2_adapter.rb:224:in `exec_query'
activerecord (4.0.0) lib/active_record/connection_adapters/mysql2_adapter.rb:233:in `select'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/query_cache.rb:61:in `block in select_all'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/query_cache.rb:76:in `cache_sql'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/query_cache.rb:61:in `select_all'
activerecord (4.0.0) lib/active_record/querying.rb:36:in `find_by_sql'
activerecord (4.0.0) lib/active_record/relation.rb:585:in `exec_queries'
activerecord (4.0.0) lib/active_record/relation.rb:471:in `load'
activerecord (4.0.0) lib/active_record/relation.rb:220:in `to_a'
activerecord (4.0.0) lib/active_record/relation/delegation.rb:12:in `each'
rails_admin (0.6.0) app/views/rails_admin/main/index.html.haml:121:in `block in __var_www_hosted_trial_shared_bundle_ruby_______gems_rails_admin_______app_views_rails_admin_main_index_html_haml___2936959405379867936_17824080'
haml (4.0.5) lib/haml/helpers/action_view_mods.rb:118:in `call'
haml (4.0.5) lib/haml/helpers/action_view_mods.rb:118:in `block (2 levels) in form_tag_with_haml'
haml (4.0.5) lib/haml/helpers.rb:278:in `with_tabs'
haml (4.0.5) lib/haml/helpers/action_view_mods.rb:118:in `block in form_tag_with_haml'
haml (4.0.5) lib/haml/helpers.rb:631:in `call'
haml (4.0.5) lib/haml/helpers.rb:631:in `block in haml_bind_proc'
haml (4.0.5) lib/haml/helpers.rb:368:in `call'
haml (4.0.5) lib/haml/helpers.rb:368:in `block in capture_haml'
haml (4.0.5) lib/haml/helpers.rb:608:in `with_haml_buffer'
haml (4.0.5) lib/haml/helpers.rb:364:in `capture_haml'
haml (4.0.5) lib/haml/helpers/xss_mods.rb:61:in `capture_haml_with_haml_xss'
haml (4.0.5) lib/haml/helpers/action_view_mods.rb:45:in `capture_with_haml'
actionpack (4.0.0) lib/action_view/helpers/form_tag_helper.rb:773:in `form_tag_in_block'
actionpack (4.0.0) lib/action_view/helpers/form_tag_helper.rb:69:in `form_tag'
haml (4.0.5) lib/haml/helpers/action_view_mods.rb:121:in `form_tag_with_haml'
haml (4.0.5) lib/haml/helpers/action_view_xss_mods.rb:18:in `form_tag_with_haml_xss'
rails_admin (0.6.0) app/views/rails_admin/main/index.html.haml:102:in `__var_www_hosted_trial_shared_bundle_ruby_______gems_rails_admin_______app_views_rails_admin_main_index_html_haml___2936959405379867936_17824080'
actionpack (4.0.0) lib/action_view/template.rb:143:in `block in render'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.0) lib/action_view/template.rb:141:in `render'
actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:49:in `block (2 levels) in render_template'
actionpack (4.0.0) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.0) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:48:in `block in render_template'
actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:56:in `render_with_layout'
actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:47:in `render_template'
actionpack (4.0.0) lib/action_view/renderer/template_renderer.rb:17:in `render'
actionpack (4.0.0) lib/action_view/renderer/renderer.rb:42:in `render_template'
actionpack (4.0.0) lib/action_view/renderer/renderer.rb:23:in `render'
actionpack (4.0.0) lib/abstract_controller/rendering.rb:127:in `_render_template'
actionpack (4.0.0) lib/action_controller/metal/streaming.rb:219:in `_render_template'
actionpack (4.0.0) lib/abstract_controller/rendering.rb:120:in `render_to_body'
actionpack (4.0.0) lib/action_controller/metal/rendering.rb:33:in `render_to_body'
actionpack (4.0.0) lib/action_controller/metal/renderers.rb:26:in `render_to_body'
actionpack (4.0.0) lib/abstract_controller/rendering.rb:97:in `render'
actionpack (4.0.0) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
activesupport (4.0.0) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
/home/ubuntu/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
activesupport (4.0.0) lib/active_support/core_ext/benchmark.rb:12:in `ms'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:41:in `block in render'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
activerecord (4.0.0) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:40:in `render'
remotipart (1.2.1) lib/remotipart/render_overrides.rb:14:in `render_with_remotipart'
rails_admin (0.6.0) lib/rails_admin/config/actions/index.rb:35:in `block (4 levels) in <class:Index>'
actionpack (4.0.0) lib/action_controller/metal/mime_responds.rb:191:in `call'
actionpack (4.0.0) lib/action_controller/metal/mime_responds.rb:191:in `respond_to'
rails_admin (0.6.0) lib/rails_admin/config/actions/index.rb:32:in `block (2 levels) in <class:Index>'
(eval):8:in `instance_eval'
(eval):8:in `index'
actionpack (4.0.0) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.0.0) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.0.0) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (4.0.0) lib/active_support/callbacks.rb:453:in `_run__4287801156838246091__process_action__callbacks'
activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord (4.0.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.0.0) lib/abstract_controller/base.rb:136:in `process'
actionpack (4.0.0) lib/abstract_controller/rendering.rb:44:in `process'
actionpack (4.0.0) lib/action_controller/metal.rb:195:in `dispatch'
actionpack (4.0.0) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.0.0) lib/action_controller/metal.rb:231:in `block in action'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:48:in `call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:655:in `call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/railtie/configurable.rb:30:in `method_missing'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:655:in `call'
omniauth (1.1.4) lib/omniauth/strategy.rb:184:in `call!'
omniauth (1.1.4) lib/omniauth/strategy.rb:164:in `call'
rack-pjax (0.7.0) lib/rack/pjax.rb:12:in `call'
newrelic_rpm (3.7.1.182) lib/new_relic/rack/error_collector.rb:50:in `call'
newrelic_rpm (3.7.1.182) lib/new_relic/rack/agent_hooks.rb:28:in `call'
newrelic_rpm (3.7.1.182) lib/new_relic/rack/browser_monitoring.rb:23:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `catch'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.5.2) lib/rack/etag.rb:23:in `call'
rack (1.5.2) lib/rack/conditionalget.rb:25:in `call'
rack (1.5.2) lib/rack/head.rb:11:in `call'
remotipart (1.2.1) lib/remotipart/middleware.rb:27:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/flash.rb:241:in `call'
rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/cookies.rb:486:in `call'
activerecord (4.0.0) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.0.0) lib/active_support/callbacks.rb:373:in `_run__496204895339166041__call__callbacks'
activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/application.rb:97:in `call'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.5/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.5/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.5/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.5/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
Gem version 0.6.0 on development and production
Development OS: OSX Mavericks
Production OS: Ubuntu 12.04 LTS
Development Ruby: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
Production Ruby: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
MYSQL version 5.6 on both machines
Model
class Subscription < ActiveRecord::Base
belongs_to :user
belongs_to :organization
end
Migration
class CreateJoinTable < ActiveRecord::Migration
def change
create_table :subscriptions, :id => false do |t|
t.integer :user_id
t.integer :organization_id
t.timestamps
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment