Translate

December 18, 2010

Three Ways of Installing Ruby

1 Compiling Ruby - Source code
2 Third Party Tools
3 Package Management Systems

Compiling Ruby - Source code

Installing from the source code is a best solution. In case you are comfortable enough with your platform and perhaps need specific settings for your environment. It's also a good solution in the event that there are no other pre-made packages for your platform. You can optimise the build for your need for you suitable platform.

Third Party Tools

The community members maintains the tool to help other to install ruby. They provide various other advantages to users. Also they are very helpful to find solutions. Following are the popular third-party tools to install Ruby.

RVM  

"Ruby Version Manager." Not only does it make installing Ruby incredibly easy, it also allows you to install and manage multiple copies of Ruby on your system, as well as multiple alternate implementations of Ruby. RVM is available for Mac OS X, Linux, or any UNIX-like operating system. Windows users should check out pik (https://github.com/vertiginous/pik) for a similar project.
For the latest instructions on installing rvm, ("https://rvm.beginrescueend.com/rvm/install/") the RVM installation page.

RubyInstaller

If you're on Windows, there's a great project to help you install Ruby: RubyInstaller. http://rubyinstaller.org/ - It gives you everything you need to set up a full Ruby development environment on Windows.
RubyInstaller is compiled with MinGW 4.5.2 which offers improved speed and better RubyGem compatibility, including support for many more native C-based extensions
To use RubyInstaller, download it from the href="http://rubyinstaller.org/downloads/ page. Then just use the installer, and you're done!

BitNami RubyStack

BitNami RubyStack greatly simplifies the development and deployment of Ruby on Rails applications. It includes ready-to-run versions of Apache, MySQL, Ruby and Rails and required dependencies. Just download and install its done!!! Simple and fast and available for all popular platforms.
BitNami Stack available for Mac OS x, Windows, Linux
To use http://bitnami.org/stack/rubystack BitNami RubyStack  

Package Management Systems

If you can't compile your own Ruby, and you don't want to use a third party tool, you can use your system's package manager to install Ruby.  Most package managers have older versions of Ruby in their repositories. If you'd like to use the newest Ruby, make sure you use the correct package name, or use any third-party tools.

Linux 

Debian GNU/Linux uses the apt package manager system. (So does Ubuntu.) You can use it like this:
sudo apt-get install ruby1.9.1
This will install Ruby 1.9.2. It has a 'library compatibility version' of 1.9.1, hence the name.

Mac OS X

Ruby 1.8.7 is fully supported in Mac OS X Lion as well as many popular Ruby gems (packages)
Many people on Mac OS X use Homebrew (http://mxcl.github.com/homebrew/) as a package manager. It's really easy to get Ruby:
brew install ruby
---------------------------------------------------------------------------------------------



December 3, 2010

What is Rails?

What is Rails?

Rails is a web application development framework written in the Ruby language. It is designed to make programming web applications easier by making assumptions about what every developer needs to get started. It allows you to write less code while accomplishing more than many other languages and frameworks. Experienced Rails developers also report that it makes web application development more fun.
Rails is opinionated software. It makes the assumption that there is a “best” way to do things, and it’s designed to encourage that way – and in some cases to discourage alternatives. If you learn “The Rails Way” you’ll probably discover a tremendous increase in productivity. If you persist in bringing old habits from other languages to your Rails development, and trying to use patterns you learned elsewhere, you may have a less happy experience.
  • DRY“Don’t Repeat Yourself” – suggests that writing the same code over and over again is a bad thing.
  • Convention Over Configuration – means that Rails makes assumptions about what you want to do and how you’re going to do it, rather than requiring you to specify every little thing through endless configuration files. Bottom line is "Just follow the convention no need of configuration."
  • REST is the best pattern for web applications – organising your application around resources and standard HTTP verbs is the fastest way to go.

http://guides.rubyonrails.org/getting_started.html

December 1, 2010

Copyright

Copyright

Most content on this site is covered by a Creative Content License.
I am placing all the code examples that appear in the articles in the public domain - feel free to use them for whatever you want, though credit would be appreciated if you are using them in a context where that would be appropriate.
Use the material covered by the license for non-commericial purposes as long as you attribute it to the author.
Material written by others will be covered by their own copyrights.

Check out the Creative Commons web site.

Copyright © Pankaj Sonawane