{"action":"created","issue":{"url":"https://api.github.com/repos/urbanairship/ruby-library/issues/108","repository_url":"https://api.github.com/repos/urbanairship/ruby-library","labels_url":"https://api.github.com/repos/urbanairship/ruby-library/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/urbanairship/ruby-library/issues/108/comments","events_url":"https://api.github.com/repos/urbanairship/ruby-library/issues/108/events","html_url":"https://github.com/urbanairship/ruby-library/issues/108","id":305659502,"number":108,"title":"UA Push Notification Not Sent When Server Ran As Daemon","user":{"login":"maynardewm","id":9875412,"avatar_url":"https://avatars1.githubusercontent.com/u/9875412?v=4","gravatar_id":"","url":"https://api.github.com/users/maynardewm","html_url":"https://github.com/maynardewm","followers_url":"https://api.github.com/users/maynardewm/followers","following_url":"https://api.github.com/users/maynardewm/following{/other_user}","gists_url":"https://api.github.com/users/maynardewm/gists{/gist_id}","starred_url":"https://api.github.com/users/maynardewm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maynardewm/subscriptions","organizations_url":"https://api.github.com/users/maynardewm/orgs","repos_url":"https://api.github.com/users/maynardewm/repos","events_url":"https://api.github.com/users/maynardewm/events{/privacy}","received_events_url":"https://api.github.com/users/maynardewm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-15T17:58:03Z","updated_at":"2018-03-15T18:20:18Z","closed_at":null,"author_association":"NONE","body":"## Expected Behavior\r\nPush notification should be sent to device.\r\n\r\n## Current Behavior\r\nIt works if I run the server as: rails s -b 0.0.0.0, but not if I run the server as rails s -d -b 0.0.0.0\r\n\r\nI get the following error:\r\n```\r\nResponse Code: 500\r\nNo such file or directory @ rb_sysopen - log/urbanairship.log\r\n```\r\n\r\n## Possible Solution\r\nIs it a permissions issue?\r\n\r\n## Rails Server Code\r\n```\r\nif @notification.save\r\n      puts(\"It was saved\")\r\n      if @post.user.devices.count > 0\r\n          puts(\"There is more than 0 devices\")\r\n          airship = UA::Client.new(key: Rails.application.secrets.ua_app_key, secret: Rails.application.secrets.ua_master_secret)\r\n          (@post.user.devices).each do |device|\r\n              if device.ua_channel_id != nil\r\n                  puts(\"User has devices\")\r\n                  push = airship.create_push\r\n                  push.audience = UA.or( UA.ios_channel(device.ua_channel_id) )\r\n                  push.notification = UA.notification(alert: 'This went to an iOS device')\r\n                  push.device_types = UA.device_types(['ios'])\r\n                  push.send_push\r\n                  puts(\"Successfully created UA notification\")\r\n              end\r\n          end\r\n      end\r\n    end\r\n```"},"comment":{"url":"https://api.github.com/repos/urbanairship/ruby-library/issues/comments/373475412","html_url":"https://github.com/urbanairship/ruby-library/issues/108#issuecomment-373475412","issue_url":"https://api.github.com/repos/urbanairship/ruby-library/issues/108","id":373475412,"user":{"login":"maynardewm","id":9875412,"avatar_url":"https://avatars1.githubusercontent.com/u/9875412?v=4","gravatar_id":"","url":"https://api.github.com/users/maynardewm","html_url":"https://github.com/maynardewm","followers_url":"https://api.github.com/users/maynardewm/followers","following_url":"https://api.github.com/users/maynardewm/following{/other_user}","gists_url":"https://api.github.com/users/maynardewm/gists{/gist_id}","starred_url":"https://api.github.com/users/maynardewm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maynardewm/subscriptions","organizations_url":"https://api.github.com/users/maynardewm/orgs","repos_url":"https://api.github.com/users/maynardewm/repos","events_url":"https://api.github.com/users/maynardewm/events{/privacy}","received_events_url":"https://api.github.com/users/maynardewm/received_events","type":"User","site_admin":false},"created_at":"2018-03-15T18:20:18Z","updated_at":"2018-03-15T18:20:18Z","author_association":"NONE","body":"The config is correct I believe:\r\n```\r\nrequire 'urbanairship'\r\nUrbanairship.configure do |config|\r\n\tconfig.log_path = 'log'\r\n\tconfig.log_level = Logger::WARN\r\nend\r\n```\r\n\r\nIt works when I run the server like this:\r\nrails s -b 0.0.0.0\r\n\r\nBut not like this:\r\nrails s -d -b 0.0.0.0"}}
{"actor":{"display_login":"maynardewm"}}