Ruby/How to install RoR3

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.
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
How to install RoR.Solutions for both the novice and professional programmers on Windows,Mac OS X and Linux.Prerequisites - page 3

For Mac OS X

The pre-packaged solution for Mac OS X is Locomotive, similar to what InstantRails means for Windows. It's available for download here

If you have version 10.4 or up of Mac OS X, then you're very lucky, because Ruby comes bundled with the operating system: it's built in.Check the version of Ruby you have installed on your system by typing "ruby -v" in the Terminal command prompter.

If it's earlier than 1.8.2, it would be a good ideea to update to a newer released version of Ruby, by using Locomotive for example. But you will always get the newest version of Ruby straight from the source and this means installing Ruby manually, not by Locomotive.

To install Ruby all by yourself:

1) download the lastest RubyGems distribution from rubyforge.org

2) type in the command prompter of Terminal :

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

This will untar the file, change the current directory and start the setup process.

You will need to replace the "0.9.2" with the latest version of RubyGems available at the moment you're reading it.

3) Install Rails:

sudo gem install rails --include-dependencies

If this does not work that well for you, or if you're having problems with the standard Ruby that came with your OS X, then please check this much more advanced tutorial from here

4) Create a scaffold for your application and start the server ( that you already installed );you're ready to start coding

rails path/to/your/new/application
cd path/to/your/new/application
ruby script/server


For Linux


Chances are, you already have version 1.8.2 or up installed if you're using Linux as your operating system on your pc or dedicated server.If you have a VPS plan with a Linux based o.s tough, it's pretty sure that Ruby won't be installed because VPS accounts are all about saving resources(disk space,running processes and ram used).Either way, you'd probably have to update to the current Ruby version or install if you don't have Ruby at all.

To check whether you have Ruby or not, type "ruby -v" in the command prompter.You should get something like this if you have it:


Image:Ruby_linux.gif


Or something like this if you don't have it:

Image:Ruby_linu.gif


Let's pretend you have an outdated version of Ruby or that you don't have it installed at all. Go to http://rubyforge.org/projects/ruby/ in order to download the latest Ruby, which at the moment I'm writing this is 1.8.6

Once you've downloaded it, we need to untar it and install.

tar xzf ruby-1.8.6.tar.gz
cd ruby-1.8.6
./configure
make
make test
sudo make install
Previous Next
Personal tools