{"action":"created","issue":{"url":"https://api.github.com/repos/packets-at-rest/packets-at-rest/issues/2","labels_url":"https://api.github.com/repos/packets-at-rest/packets-at-rest/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/packets-at-rest/packets-at-rest/issues/2/comments","events_url":"https://api.github.com/repos/packets-at-rest/packets-at-rest/issues/2/events","html_url":"https://github.com/packets-at-rest/packets-at-rest/issues/2","id":85622475,"number":2,"title":"ruby 2.x required for plugins include","user":{"login":"shadowbq","id":64570,"avatar_url":"https://avatars.githubusercontent.com/u/64570?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowbq","html_url":"https://github.com/shadowbq","followers_url":"https://api.github.com/users/shadowbq/followers","following_url":"https://api.github.com/users/shadowbq/following{/other_user}","gists_url":"https://api.github.com/users/shadowbq/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowbq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowbq/subscriptions","organizations_url":"https://api.github.com/users/shadowbq/orgs","repos_url":"https://api.github.com/users/shadowbq/repos","events_url":"https://api.github.com/users/shadowbq/events{/privacy}","received_events_url":"https://api.github.com/users/shadowbq/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/packets-at-rest/packets-at-rest/labels/bug","name":"bug","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-05T20:09:39Z","updated_at":"2015-06-16T19:29:01Z","closed_at":null,"body":"```ruby\r\npackets-at-rest/lib/pingable_server.rb:30:in `const_get': wrong constant name PacketsAtRest::ParPluginFacter::Plugin (NameError)\r\n```\r\n\r\nIn Ruby 2.x, you can just do this:\r\n```ruby\r\nObject.const_get('Admin::MetaDatasController')\r\n=> Admin::MetaDatasController\r\n```\r\n\r\nin Ruby 1.9.x we need to do this:\r\n```ruby\r\ndef class_from_string(str)\r\n  str.split('::').inject(Object) do |mod, class_name|\r\n    mod.const_get(class_name)\r\n  end\r\nend\r\n\r\nthe_class = class_from_string(\"Admin::MetaDatasController\")\r\n```"},"comment":{"url":"https://api.github.com/repos/packets-at-rest/packets-at-rest/issues/comments/112538504","html_url":"https://github.com/packets-at-rest/packets-at-rest/issues/2#issuecomment-112538504","issue_url":"https://api.github.com/repos/packets-at-rest/packets-at-rest/issues/2","id":112538504,"user":{"login":"shadowbq","id":64570,"avatar_url":"https://avatars.githubusercontent.com/u/64570?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowbq","html_url":"https://github.com/shadowbq","followers_url":"https://api.github.com/users/shadowbq/followers","following_url":"https://api.github.com/users/shadowbq/following{/other_user}","gists_url":"https://api.github.com/users/shadowbq/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowbq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowbq/subscriptions","organizations_url":"https://api.github.com/users/shadowbq/orgs","repos_url":"https://api.github.com/users/shadowbq/repos","events_url":"https://api.github.com/users/shadowbq/events{/privacy}","received_events_url":"https://api.github.com/users/shadowbq/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T19:29:01Z","updated_at":"2015-06-16T19:29:01Z","body":"same error but manifested by nginx\r\n\r\n```ruby \r\n 2015-06-16 15:26:04.8086 8931/7f4f7c748700 App/Implementation.cpp:287 ]: Could not spawn process for application /opt/packets-at-rest: An error occured while starting up the preloader.\r\n  Error ID: eda14c4f\r\n  Error details saved to: /tmp/passenger-error-vtEKWy.html\r\n  Message from application: wrong constant name PacketsAtRest::ParPluginFacter::Plugin (NameError)\r\n  /opt/packets-at-rest/lib/pingable_server.rb:30:in `const_get'\r\n  /opt/packets-at-rest/lib/pingable_server.rb:30:in `block in <class:PingableServer>'\r\n  /opt/packets-at-rest/lib/pingable_server.rb:28:in `each'\r\n```"}}