I'm going to install Ruby on Rails in my Windows Vista. But I prefer to install them locally. So I download all the gems first. I know it is not as simple as by directly type "gem install rails" in command line, but I think this way is more faster and it's useful when we don't have internet connection in our computer.
So what I do first is to visit rubyforge to search for rails gem and its dependencies.
Here are gems I need to download (I use the version of 2.1.2 for rails and its dependencies at the time of writing this article):
1. One-click Ruby v186.25 Installer
The gems (Note : download the ones with .gem extension) :
2. Rake 0.8.3
3. ActiveSupport 2.1.2
4. ActiveRecord 2.1.2
5. ActionPack 2.1.2
6. ActionMailer 2.1.2
7. ActiveResource 2.1.2
8. Rails 2.1.2
Now, we'll start installing. Here is the step:
1. Install Ruby by clicking the installer. Follow the steps until you finish the installation.
2. Open command line and point to the path where you saved the rails gems.
3. Type "gem install -l rake-0.8.3.gem" (-l means that you take it from local repository)
1. Install Ruby by clicking the installer. Follow the steps until you finish the installation.
2. Open command line and point to the path where you saved the rails gems.
3. Type "gem install -l rake-0.8.3.gem" (-l means that you take it from local repository)

4. Then type "gem install
Check that everything is installed :
Make your first rails app:
1. Type "rails test", It will make new directory called "test"
2. Move to "test" directory
3. Type "ruby script/server"
However, I got an error that it requires rubygems >=1.1.1 .So I download the latest rubygems (rubygems-1.3.1.zip) here. unpacked it and then type "ruby setup.rb" at the unpacked directory)
Now, I can run ruby script/server.
Then, try it out in your browser, type http://localhost:3000/. If ruby on rails is installed properly. Then you will find this page:
Congrats! Now you have ruby on rails on your machine.
Enjoy and Cheers! ^_^






No comments:
Post a Comment