Ruby/How to install RoR4

From Meshplex

Jump to: navigation, search
Image:Ruby_on_rails_tutorials.jpg
Ruby for complete beginners
Ruby Introduction
What can I use RoR for?
Reasons for choosing RoR over other popular programming languages such as php or asp.net .What makes Ruby so much more special
Where can I find RoR? In what “forms” does it come?
How to install RoR.Solutions for both the novice and professional programmers on Windows,Mac OS X and Linux.Prerequisites.
** Install Ruby on Windows
** Install Ruby on Mac/Linux
** Install Ruby on Linux
** Install MySQL for Ruby
** Ruby Install Troubleshooting
** Ruby Install Troubleshooting2
Ruby programming tutorials for beginners:
Ruby Basics
Ruby Variables, Datatypes, Operators
Ruby Symbols
Ruby Statements
Ruby Converting data to another type: type conversion or typecasting
Ruby Arrays, Hashes, Ranges
Ruby Functions and built in functions
Ruby Control structures
Ruby Regular expressions and blocks
Ruby Loops
Ruby Recursion
Ruby Data Structures
Ruby Methods, Classes, Modules, Namespaces
Ruby Exceptions
Ruby Object Oriented Programming
Ruby Multithreading
Ruby File Handling.Input and Output
Ruby Basic GUI
Ruby and databases.Ruby on Rails and MySQL
Ruby Basic CGI.Using fastCGI
Ruby Basic Networking and web programming
Ruby Basic Graphics
Ajax and Rails.Web 2.0 and what it means
Ruby Testing, Debugging, Automation of tasks
Ruby Apache,Capistrano, Mongrel,lighttpd – reviews and tips
Finding a Ruby on Rails ready web hosting company
BONUS: mini tutorial for a simple RoR application

[edit] How to install RoR.Solutions for both the novice and professional programmers on Windows,Mac OS X and Linux.Prerequisites - page 4

For Linux - page 2

Next step is getting RubyGems from here. Current version is 0.9.2

Once you've downloaded, run these commands:

tar xzf rubygems-0.9.2.tar.gz
cd rubygems-0.9.2
sudo ruby setup.rb

Next, to install Rails, all you have to do is:

sudo gem install rails --include-dependencies

That's it, you're ready to start!

Keep in mind that,no matter what operating system you use, once you get the basics of Ruby and want to do more advanced things you will need a database system that you will have to install and configure Rails to use it.

I will show you how to install MySQL and configure it to work with Rails.

[edit] Installing MySQL and configuring Rails


To download the Windows Essentials version of MySQL, which is really everything you will be needing, go to the official site here.There is a mysql distribution available for Linux as well on the same page, however the installation process will be different.

In the following,I will explain the MySQL install process for Windows with the Windows Essentails 5.0.37 distribution.

Once you've downloaded the installer from the site, open it.It will look like this:

Image:Mysql1.gif

Click "Next" and select "Typical" as type of install.


Image:Mysql2.gif

On the next screen click "Install".After this, the installer will copy files to your system and then a window will pop-up asking for your account username and pass at mysql.com


Image:Mysql3.gif

You can select "Skip Sing-up" if you wish.Make sure "Configure MySQL server now" is selected on the next screen and click "Finish".


The server configuration wizard will start.Click "next", select "Standard Configuration".

Image:Mysql6.gif

On the next screen, select "Install as Windows Service" and "Include Bin Directory in Windows PATH".

Image:Mysql5.gif

Select "Create An Anonymous Account" on the next screen.This setting is ok only for development on your pc and it's not safe at all for a server for example, because this setting actually creates a superuser named "root" with no pass associated which is a serious security risk.If this was a setting applied to a real,live web server, it would probably be "hacked" in a matter of minutes.


After this, click on "Execute".A success message will greet you on the next screen.Click "finish" to exit the wizard.

Image:Mysql4.gif

That's it.You've finished installing MySQL. Let's configure it to work with Rails now.

First of all, because Rails cannot create a database by itself, you will need an administrative software to take care of this for you. I suggest installing MySQL Tools, offered by the same site that offers the original MySQL distribution.


Go here and download the corresponding version to the operating system you have installed( in case of this tutorial, a version of Windows)

Previous Next