|
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:
Or something like this if you don't have it:
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
|