3

Super new to programming.

Anyway, let's say I have a script that does something simple, like tells you the number of words you typed into a box (upon hitting a submit button) written in Ruby using Sinatra.

If I wanted this text box to show up on a webpage, like mysite.com/simple_app how would I set that up?

I apologize for the super noob question, but I have no idea where to start with this.

I checked out this question (http://stackoverflow.com/questions/9489803/how-to-turn-ruby-script-into-a-web-app) and since I already have working w localhost in Sinatra, I'm kind of wondering what's the next step.

Melanie Palen
  • 2,645
  • 6
  • 31
  • 50

2 Answers2

4

I would very much recommend you try out Heroku.

As you're relatively new to programming, you don't want to mess with server stuff yet. Heroku handles most of the server configurations so you can focus more on your application.

It also offers a free account, with limitations of course. But it's very nice for beginners, compared to VPS solutions which normally cost 20 bucks a month.

Check out this great article on deploying apps with Sinatra and Heroku:

Sinatra + Heroku = Super Fast Deployment

And also how to deploy any Rack-based applications on Heroku:

Deploying Rack-based Apps on Heroku

gerky
  • 6,267
  • 11
  • 55
  • 82
3

If you want to just deploy it somewhere and don't want to mess about with servers, try pushing your Sinatra app to Heroku. They have some fairly comprehensive documentation to get you started.

If you have your own server, it's a bit more involved, although what you trade off for simplicity you gain in control. The simplest thing that would work would be to check out a working copy of your app on said server, then run it like you do on localhost.

Google ruby deployment. It's a bit of a minefield, although the options are much more attractive than they were 5 years ago. For the simplest thing(s) that work, do either of the above. For anything else, you're out there with the rest of us ;)

Chris Mowforth
  • 6,689
  • 2
  • 26
  • 36