For a website running Ruby code you'll probably want Ruby on Rails.
However, if you don't even know the basics of Ruby I'd emphatically
recommend learning Ruby first.
There are plenty of good tutorials out there which are just a quick
Google away from your fingertips. http://www.ruby-lang.org/en/documentation/quickstart/
On 13 Αυγ 2013, at 23:22 , Norie92 .. <lists@ruby-forum.com> wrote:
Hello, I am new to computer programming for the most part.
I made a small amount of simple code and would like to know how to
publish it into a website.
For example (in psuedo code)
1. Prompt for user's name
2. Output user input backwards
so this website would reverse the person's name. (This is just an
example, not what I am trying to actually publish)
So how would I go about turning this code into a website people would
visit to have their names generated backwards?
Doesn't prompt for a user, but using Sinatra [1] you can easily do something like this:
---
#!/usr/bin/env ruby
# encoding: UTF-8
require 'sinatra'
get '/:name' do
"Hi #{params[:name].reverse}"
end
---
If you run this code and browse to localhost:4567/mario you can see the result. However that's just the tip of the iceberg for a full featured application.
I don't even know how to run the code in the "Command Prompt with Ruby"
thing.
Fix that first, then you can start writing web-apps. Doesn't work the other way around.
Panagiotis (atmosx) Atmatzidis
email: atma@convalesco.org
URL: http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5
--
The wise man said: "Never argue with an idiot. They bring you down to their level and beat you with experience."