0

I'm using Codio to create a Sinatra app. Obviously, since it's cloud-based, I've added the line set :bind, '0.0.0.0' to app.rb. I've also set my database.yml file to say host: 0.0.0.0for both the development and test environments. (I'm using PostgreSQL, and yes I made sure under Tools --> Install Software, that it is running. )

When I run ruby app.rb in my terminal, Sinatra takes the stage at Port 4567, which I'm able to view perfectly fine.

But when I run rackup, on the other hand, Sinatra takes the stage at Port 9292. Trying to preview at that port yields a HTTP Error 502 Bad Gateway status.

(Note: I'm unable to post within the Codio Community forums at the moment--their system doesn't seem to realize I'm logged in when I go into their forums page, and it won't let me log in. I'm standing by for help from them on that. Until then, I figured I'd reach out here on StackOverflow.)

  • UPDATE: When I run `rackup --host 0.0.0.0`, it works!! I'm able to preview my app at Port 9292. Ha. Answered my own question. Thanks for helping me "rubber duck"-it StackOverflow! – KeniaWriter Jul 30 '15 at 23:09

1 Answers1

0

Kenia

Hi.. saw your message to us and replied but seems you haven't picked it up yet? That message though wasn't clear you were talking about the Codio forum :) You need to register separately there - the forum is not associated with your Codio account credentials

ijobling
  • 46
  • 1
  • Hi there! You're right: I wasn't clear on my original email to Codio that I was talking about the forum--my mistake! Thank you for clarifying that I need to register separately there. I didn't realize that my Codio projects account was separate from the Codio forums. – KeniaWriter Aug 03 '15 at 17:12