Ruby Newbie questions

I have a website created with FrontPage. So I really didn’t need to
learn programming, just how to use that software. I 've alway wanted to
learn how to create a website. Is Ruby the way to go for a beginner?
I downloaded the program and have tinkered with it a bit. I understand
variables and stuff because I can do a little VB6 programming.
But once you get a web page done with Ruby, how do you publish it
online? I have to ask this very elementary question because as you
know, FrontPage has its own publishing feature.

Thanks for any help

Rae

Rae schrieb:

Rae
You have a couple of options with Ruby and webpublishing, the most
famous being Rails [1]. And of course you can write your own scripts to
render the HTML presentation (FrontPage creates HTML output) of your
content, usually stored in a database. These scripts are interpreted by
the webserver (Apache2 with mod_ruby, for example), so you require a
hosting plan which offers you Ruby (either for CGI, or as your own
server, be that a virtual one, or a “real” one).
To get the scripts on the server, you’ll need either FTP or SSH access
to get teh scripts on the server.

To put it into a nutshell: If you don’t know how to handle this yet,
consider toying around on your own computer with Ruby, and getting
familiar with Ruby and the concepts used when writing web applications.

That being said, check out Rails, and other methods (I’m sure others on
the list can point you into the right direction for alternatives, and
give you more proficient advice).

Hope that helps.
-Phill.

Disclaimer: I’m keeping away from writing web applications until my Ruby
skills are a lot better (fledgeling novice myself)…

[1] http://www.rubyonrails.org/

Rae wrote:

I have a website created with FrontPage. So I really didn’t need to
learn programming, just how to use that software. I 've alway wanted to
learn how to create a website. Is Ruby the way to go for a beginner?

Learning to program in Ruby is probably one of the better choices you
can make. Although all computer languages have their various strengths
and weaknesses, most people (including myself) believe that Ruby helps
the programmer focus on the task at hand and less on the idiosyncrasies
of the language.

I downloaded the program and have tinkered with it a bit. I understand
variables and stuff because I can do a little VB6 programming.
But once you get a web page done with Ruby, how do you publish it
online? I have to ask this very elementary question because as you
know, FrontPage has its own publishing feature.

How you approach a website using Ruby depends on your goals and
capabilities. In the most basic sense, Ruby is like any other program in
which you use secure (preferably) FTP connections to connect to your
site and transfer files back and forth. What those files look like
though depend on how you use Ruby. In the ASP sense, you can embed Ruby
in your web pages (i.e. .rhtml) and serve them accordingly. You can also
use Ruby as CGI scripts where you call an executable in the CGI
directory (or elsewhere depending on the configuration) which then
returns output to the browser. Most people using Ruby for web sites are
probably using a framework like Rails because of the productivity boost
that results when you learn the standard convention of Rails and follow
it. Like a swiss army knife, Ruby can be used in a variety of situations
very successfully.

There have been many threads on which IDE to use to program in and many
will have FTP capabilities built in. I use Komodo and Eclipse since each
have some features that the other doesn’t. Your mileage will vary
though. No doubt your needs and preferences will change as you become
more advanced.

HTH,
Jim

thanks all.
I downloaded Ruby 1-8521 free which has a program called FreeRide.
Where do I download Rails? Is that free also?

On Jan 26, 1:15 pm, “Rae” [email protected] wrote:

thanks all.
I downloaded Ruby 1-8521 free which has a program called FreeRide.
Where do I download Rails? Is that free also?

See http://www.rubyonrails.com

Also, when you have your (inevitable) rails questions, you should know
that it has its own user group for asking questions specifically about
Rails (and not the Ruby language in general):
http://groups.google.com/group/rubyonrails-talk

Rather that try to configure everything separately which can be a little
difficult when first starting out, try the Instant Rails package at
http://rubyforge.org/projects/instantrails/ and make your life easier.
Not only will you be programming on day 1 instead of configuring, when
you are ready to make the jump and customize your installation (perhaps
to an updated Apache or MySQL version) you can look in the Instant Rails
‘conf_files’ directory and borrow whatever you need from a working
configuration.

I don’t think that FreeRide isn’t in the latest InstantRails
distribution so you may need to fetch it directly from
http://rubyforge.org/projects/freeride/ if you want it.

-Jim

Well I really don’t understand what the difference is between Ruby and
Rails? Could someone explain that to me please? Is there a program that
you need to see your test programs? For example, in Front page, I can
preview what my webpage will look like. Is there a program that you can
use with Ruby (or is it Rails?) to see what your coded page will look
like?

Rails is a framework for interacting with databases and web servers that
is programmed in Ruby. When starting a project with Rails, there is a
lot of functionality built-in so that you don’t need to program it from
scratch.

For instance, many database driven web sites modify records using simple
Create, Read, Update and Delete (CRUD) operations. If you were starting
from scratch with Ruby, you would probably use the DBI interface (among
many alternatives) to connect to a database, prepare a statement handle
where the SQL is sent to the database, execute the statement handle and
then fetch the results. None of this is overly difficult but it can be
tedious. Add in the need for a web site to handle record navigation
(first record, previous record, next record, last record), validate form
values and before you know it, a simple database interface can take a
fair amount of time to get all the details ironed out and working
correctly.

Rails simplifies this by providing a scaffold where all this
functionality is built in and ready to use. If you follow the normal
convention of how a database accesses are done, Rails makes it simple to
connect to the database, validate form fields for appropriate values,
and modify the records accordingly. A programmer can create an
application with Rails in an hour or two that would take a better part
of a day (or more) without it. So its not that Rails allows you to do
things you can’t do in Ruby, it makes it far easier and faster to do so.

For web site development and testing, all you would need is a web
browser to test the output much like in FrontPage. There are times
though that seeing the final output is not enough to debug what is going
on and for those instances your would use the Interactive Ruby (IRB)
tool to step through and test code further. Rails also makes it easier
to write unit tests to verify that code is working properly.

It sounds like you should sit down with a good book and read a bit to
get a better understanding of Rails (apologies to all for my
oversimplified description of Rails and IRB). My recommendation is
“Agile Web D. with Rails”, second edition and if you work
through the examples in the book you’ll be hooked on Rails in no time.

HTH,
Jim

Thanks. I have a little better understanding now.

Rae schrieb:

Well I really don’t understand what the difference is between Ruby and
Rails?

Ruby is a universal programming language. I use it for textual data
analysis and
no web development at all.

Rails is an application written in Ruby.

Wolfgang Nádasi-Donner