COMPUTER REPAIRS  0118 9352873

email: repairs@chephrenrepairs.com

 
line decor
COMPUTER FIXER BLOG  >CALL OUT CACULATOR Ver1.1.4   >CONTACT US:  >RSS Feed:   Thursday, July 29th 2010
line decor
   
 

Computer Services / Repairing.

email: repairs@chephrenrepairs.com | page end | news Cost from £20.00 per / hr

Ruby on Rails......-- whats that you ask as you look at this new page at

chephrenrepairs.com

Firstly we look at some basics, like what is Ruby and where to get the langage from, then we

look at how to tell that Ruby is installed, how to get Rails, what is Rails and what type of server do

Backingup and Recovery Hardware Faiure Problems with the Mail Broadband Setup Wireless Security Contact Us

you need to have running on your computer to actually view Ruby on Rails pages. We will also look at editors that will help you when writing your Ruby or Rails code.

What is Ruby?

Ruby is a programming language, and it can do scripting, thats where a program runs within a web page to accomplish various things. PHP is another scripting language and also can run in a web page as well? Now the thing is that ruby is a purely object orientated language, this means everything ia an object!? This is going to be hard to explain as it takes a bit of noddle to get your head around objects, but it is some what diffrent from langages that are either not object orientated or can handle some object orientation, we will try to explain a bit latter....

Ruby will run on more less any computer operationg system, so its ok on a Mac and on Linux and Windows and other operationg systems, we are going to talk about Ruby on Windows in particular running on XP Service pack 3....

Ruby comes with Gems, oh gooosh you say whats that, well its like basically a whole load of programming functions that are already written for you, and thus it is probably preferable to download Ruby and its Gems all at once....? So where from you ask ???

Here we explaine about a one click installer for Windows: head over to ruby language web site

Once you have got to the Ruby Langage web site look for the Downloads, in the section entitled Ruby on Windows find the One Click Installer. now click on this, but remmember to tick SciTE and click Enable Ruby Gems. You should end up with a file in your Dowloads folder on your computer, you simply look for the icon, is will be something like : ruby186-27_rc2.exe this is the ruby installer, click on it and chosse run, what will happen is that once you have chossen the things to tick as above a window will open and a lot of text will scroll through that window, this is Ruby and Gems installing, your computer will be busy for a while get a stiff drink or an ice cream or a jam sandwich whilst this happens.

So how to check that ruby is installed: simples...... just go start Run, and type in cmd, now you have the classic black dos window...

Type in : ruby --version then hit return then wait.....

After a moment or two you will see something like : ruby 1.8.6 <2008-08-11 patchlevel 287> [i386-mswin32]

now you know ruby is installed and you see the version number.... As Yet you do not have Rails, why do you want Rails??, what is it and how to install it, for the answers to these questions choose the Menu on this page Rails_getting it and_installation.

Rails: .I guess really Rails is a Ruby Gem, it is grated a particular Ruby Gem, but that what it is.... we found that in a lot of books it says you can just simply go to that good old Dos Window and issue a command to install Rails, but we found that that did not work... oh holy blinking heck why....

Many books say just go to the command prompt and type in gem install rails then return. this did not work, rails was not installed following issuing this command....... we thought for a moment, instead we issued the command gem update --system and of course return, we waited and got some text back : the gist of which was that it said Sucessfully installed rubygems-update-1.3.4 also

rubygems 1.3.4 /ri was installed into C:/Ruby/lib/ruby/gems/1.8/doc/rubygems-1.3.4/r

and rubygems-1.3.4/rdoc was installed into C:/Ruby/lib/ruby/gems/1.8/doc/rubygems-1.3.4/rdoc it also said

staingely: unable to find relase notes, then said:

RubyGems installed the following executables:

C:/Ruby/bin/gem

Ruby Gems system software updated '"update --system' is not recognized as an internal or external command, operable program or batch file.

"well even though you have installed Ruby and apparently some Gems, you may not haveRails, in particular we are talking about Rails 2 and even more particularly Rails 2.3.2."

 

Once you have updated the gems you may be sucessfull with the command again given to the dos prompt:

gem install rails

We got back all this:

Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.2
Successfully installed activerecord-2.3.2
Successfully installed actionpack-2.3.2
Successfully installed actionmailer-2.3.2
Successfully installed activeresource-2.3.2
Successfully installed rails-2.3.2
7 gems installed
Installing ri documentation for rake-0.8.7...
Installing ri documentation for activesupport-2.3.2...

Quite alot is'nt it, in order to tell whether Rails is installed you can now try the command again at the command prompt:

rails --version

You should see :

Rails 2.3.2

As long as you see this responce you know that Rails has been installed and is there ready to be used. Now you need to learn a few more things, for example Rails is like haveing a whole new way of creating a Web Application. So Rails is a command line tool, and in order to use it all we do is to go to the Command prompt, that is the Dos Window: You Know:: Start Run Cmd. and then issue a very simple command like for example:

rails local   press return of course.

Pay attention, this is where the Rails application is made and it depends upon where you are in the directory tree as to where the applications structure will be created. So, say you are at C:/Documents and Settings/Bill

What happens is that the computer goes off and creates a whole directory structure for you, that structure is in the Directory local, and the directoty local will be created directly under C:/Documents and Settings/Bill