{"action":"created","issue":{"url":"https://api.github.com/repos/sinatra/sinatra/issues/1176","repository_url":"https://api.github.com/repos/sinatra/sinatra","labels_url":"https://api.github.com/repos/sinatra/sinatra/issues/1176/labels{/name}","comments_url":"https://api.github.com/repos/sinatra/sinatra/issues/1176/comments","events_url":"https://api.github.com/repos/sinatra/sinatra/issues/1176/events","html_url":"https://github.com/sinatra/sinatra/issues/1176","id":173117756,"number":1176,"title":"Issue deploying Rails 5 app with puma and sinatra 2.0.0beta2 on AWS Elastic Beanstalk Ruby 2.3","user":{"login":"wfried","id":6283264,"avatar_url":"https://avatars.githubusercontent.com/u/6283264?v=3","gravatar_id":"","url":"https://api.github.com/users/wfried","html_url":"https://github.com/wfried","followers_url":"https://api.github.com/users/wfried/followers","following_url":"https://api.github.com/users/wfried/following{/other_user}","gists_url":"https://api.github.com/users/wfried/gists{/gist_id}","starred_url":"https://api.github.com/users/wfried/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wfried/subscriptions","organizations_url":"https://api.github.com/users/wfried/orgs","repos_url":"https://api.github.com/users/wfried/repos","events_url":"https://api.github.com/users/wfried/events{/privacy}","received_events_url":"https://api.github.com/users/wfried/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-25T05:34:11Z","updated_at":"2016-08-25T15:54:57Z","closed_at":null,"body":"I have a Rails app that is running successfully on Rails 4.2 with Ruby 2.3 and Sinatra 1.0 and Puma 3.6.0.\r\n\r\nI use Sinatra because of the gem \"Delayed Job Web\" which has it as a dependency.\r\nI am upgrading my app to to Rails 5.0.0.1, and Sinatra to 2.0.0.beta2 for Rails 5 compatibility.  Puma is still 3.6.0.\r\n\r\nI host the app at AWS with Elastic Beanstalk.  My app runs fine locally with Rails 5 and Sinatra 2.0.0.beta2, but when I deploy it to Elastic Beanstalk, I see an error in the puma log during restarts as shown below, though aside from this, the app runs as expected. \r\n\r\nBased on the stack trace, it looks like a directory that is being passed to Sinatra no longer exists at the time it's needed. However, this same issue didn't happen with Rails 4.2 and Sinatra 1.0 on the same machine and same version of the Amazon Linux AMI, so I'm not sure what's causing it.\r\n\r\nI'm new to Sinatra, so any advice would be appreciated.  If this is the wrong place to file this issue, I can also post it on Stack Overflow.  Thanks.\r\n\r\nStack trace is:\r\n```\r\nAug 23 20:29:16 puma.log:  === puma startup: 2016-08-24 03:29:16 +0000 ===\r\nAug 23 20:29:23 puma.log:  [9376] - Worker 0 (pid: 9379) booted, phase: 0\r\nAug 24 08:39:03 puma.log:  [9376] - Gracefully shutting down workers...\r\nAug 24 08:39:05 puma.log:  /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-2.0.0.beta2/lib/sinatra/main.rb:11:in `expand_path': No such file or directory - getcwd (Errno::ENOENT)\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-2.0.0.beta2/lib/sinatra/main.rb:11:in `block in <class:Application>'\r\nAug 24 08:39:05 puma.log:    from (eval):1:in `run?'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-2.0.0.beta2/lib/sinatra/main.rb:26:in `block in <module:Sinatra>'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/cluster.rb:120:in `fork'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/cluster.rb:120:in `block in spawn_workers'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/cluster.rb:116:in `times'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/cluster.rb:116:in `spawn_workers'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/cluster.rb:426:in `run'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/launcher.rb:172:in `run'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/cli.rb:74:in `run'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/bin/puma:10:in `<top (required)>'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/bin/puma:23:in `load'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/bin/puma:23:in `<top (required)>'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/cli/exec.rb:63:in `load'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/cli/exec.rb:63:in `kernel_load'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/cli/exec.rb:24:in `run'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/cli.rb:304:in `exec'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/cli.rb:11:in `start'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/exe/bundle:27:in `block in <top (required)>'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/exe/bundle:19:in `<top (required)>'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/bin/bundle:23:in `load'\r\nAug 24 08:39:05 puma.log:    from /opt/rubies/ruby-2.3.1/bin/bundle:23:in `<main>'\r\nAug 24 08:39:05 puma.log:  [9376] === puma shutdown: 2016-08-24 15:39:05 +0000 ===\r\nAug 24 08:39:05 puma.log:  [9376] - Goodbye!```"},"comment":{"url":"https://api.github.com/repos/sinatra/sinatra/issues/comments/242439485","html_url":"https://github.com/sinatra/sinatra/issues/1176#issuecomment-242439485","issue_url":"https://api.github.com/repos/sinatra/sinatra/issues/1176","id":242439485,"user":{"login":"jkowens","id":585943,"avatar_url":"https://avatars.githubusercontent.com/u/585943?v=3","gravatar_id":"","url":"https://api.github.com/users/jkowens","html_url":"https://github.com/jkowens","followers_url":"https://api.github.com/users/jkowens/followers","following_url":"https://api.github.com/users/jkowens/following{/other_user}","gists_url":"https://api.github.com/users/jkowens/gists{/gist_id}","starred_url":"https://api.github.com/users/jkowens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkowens/subscriptions","organizations_url":"https://api.github.com/users/jkowens/orgs","repos_url":"https://api.github.com/users/jkowens/repos","events_url":"https://api.github.com/users/jkowens/events{/privacy}","received_events_url":"https://api.github.com/users/jkowens/received_events","type":"User","site_admin":false},"created_at":"2016-08-25T15:54:57Z","updated_at":"2016-08-25T15:54:57Z","body":"This might be an issue with your Elastic Beanstalk environment.\r\n\r\nSee: http://stackoverflow.com/questions/21505878/no-such-file-or-directory-getcwd"}}
{"actor":{"display_login":"jkowens"}}