Setting up Ruby 1.9.3, RubyGems and Rails 3

Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. It was also influenced by Eiffel and Lisp. Ruby was first designed and developed in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan. Ruby supports multiple programming paradigms, including functional, object oriented and imperative. It also has a dynamic type system and automatic memory management; it is therefore similar in varying respects to Smalltalk, Python, Perl, Lisp etc.

Ruby on Rails, often simply Rails, is an open source web application framework which runs on the Ruby programming language. It allows creating pages and applications that gather information from the web server, talk to or query the database, and render templates out of the box. As a result, Rails features a routing system that is independent of the web server. Ruby on Rails emphasizes the use of well-known software engineering patterns and principles, such as active record pattern, convention over configuration, don't repeat yourself, and model-view-controller.

Follow the steps to install ruby, RubyGems and rails. We will also create an empty rails application and start it to see if everything is fine:

  1. Download ruby windows installer 1.9.3 and install it like any windows program. You can download from http://rubyinstaller.org/downloads or simply using a Google search for ruby windows installer 1.9.3.
  2. Download RubyGems, unzip to a folder. You can download from http://rubygems.org/pages/download or simply using a Google search for RubyGems download. Since you don't have any RubyGems installed, use the pre-gem approach. Refer to the download page to see how to update RubyGems.
  3. Now, cd into the unzipped RubyGems forlder and install RubyGems with command:  ruby setup.rb
  4. Download correct devkit for your ruby version from ruby download site (), unzip into a permanent location.   Ruby 1.9.3 require tdm-32-4.5.2, Ruby 2.0.0 require mingw64-32-4.7.2 and Ruby 2.0.0 x64 (64bits) require mingw64-64-4.7.2.
  5. Now cd into the unzipped location.
  6. First run: ruby dk.rb init
  7. Then run: ruby dk.rb install
  8. With RubyGems, you can install all of Rails and its dependencies by running: gem install rails
  9. You can create a new rails application as: rails new MyNewApp
  10. Now, cd to MyNewApp folder and run: rails server

 

Quick Notes Finder Tags

Activities (1) advanced java (1) agile (3) App Servers (6) archived notes (2) Arrays (1) Best Practices (12) Best Practices (Design) (3) Best Practices (Java) (7) Best Practices (Java EE) (1) BigData (3) Chars & Encodings (6) coding problems (2) Collections (15) contests (3) Core Java (All) (55) course plan (2) Database (12) Design patterns (8) dev tools (3) downloads (2) eclipse (9) Essentials (1) examples (14) Exception (1) Exceptions (4) Exercise (1) exercises (6) Getting Started (18) Groovy (2) hadoop (4) hibernate (77) hibernate interview questions (6) History (1) Hot book (5) http monitoring (2) Inheritance (4) intellij (1) java 8 notes (4) Java 9 (1) Java Concepts (7) Java Core (9) java ee exercises (1) java ee interview questions (2) Java Elements (16) Java Environment (1) Java Features (4) java interview points (4) java interview questions (4) javajee initiatives (1) javajee thoughts (3) Java Performance (6) Java Programmer 1 (11) Java Programmer 2 (7) Javascript Frameworks (1) Java SE Professional (1) JPA 1 - Module (6) JPA 1 - Modules (1) JSP (1) Legacy Java (1) linked list (3) maven (1) Multithreading (16) NFR (1) No SQL (1) Object Oriented (9) OCPJP (4) OCPWCD (1) OOAD (3) Operators (4) Overloading (2) Overriding (2) Overviews (1) policies (1) programming (1) Quartz Scheduler (1) Quizzes (17) RabbitMQ (1) references (2) restful web service (3) Searching (1) security (10) Servlets (8) Servlets and JSP (31) Site Usage Guidelines (1) Sorting (1) source code management (1) spring (4) spring boot (3) Spring Examples (1) Spring Features (1) spring jpa (1) Stack (1) Streams & IO (3) Strings (11) SW Developer Tools (2) testing (1) troubleshooting (1) user interface (1) vxml (8) web services (1) Web Technologies (1) Web Technology Books (1) youtube (1)