starting a software project – ror as example

Working in software development field you need to work on “devil” details, manage dependencies, commit to deadlines and ensure a smooth process of development and maintenance and not be the bottleneck of a project success.

While being organized is an important aspect of anyone’s life style, it’s an important aspect of every developer’s life to ensure – in the first place – a lesser-stressed day to day work (uh, well!).

in this article I am telling the story of setting up a development environment for a Ruby on rails application, but you can apply the same concepts for any project, regardless of the programming language you use, regardless of the techniques you use and regardless of any 3rd party integration requirements.

to start simply, after receiving project requirements, doing your researches and decide on technology to use, you need to start thinking about the process of development, deployment and testing, until the first production ready product is in place.

Development

Obviously you need to install Ruby on Rails framework (here we use the latest stable ruby version 1.9.2 and rails 3.x at the time of writing this article) to start developing a Ruby on Rails based-project, so, here are the steps to install RoR for your Linux Machine (Ruby on Rails on Windows machines works on a one-click installer).

  • using Linux famous software manager yum, we will install the OS dependencies for ruby
    su - root
    yum install zlib zlib-devel openssl openssl-devel readline readline-devel
  • download ruby 1.9.2x from source.
  • compile ruby source and install additional libraries using the following commands
    cd ruby-1.9.2-p0
    ./configure
    make
    make install
    cd ext/zlib
    ruby extconf.rb
    make
    make install
    cd ../openssl
    make
    make install
    cd ../readline
    make
    make install
    sudo gem install rails
    cd ext/zlib
    ruby extconf.rb
    make
    make install
    cd ../openssl
    make
    make install
    cd ../readline
    make
    make install

    ruby 1.9.2 ships with gem! that means you don’t need to install gem.

  • install rails using gem command that just installed with ruby
    gem install rails
  • logout from super user root and create your ruby on rails application
  • rails new my_app
    rails server
  • go to http://127.0.0.1:3000/ to test that your installation is working as expected, you should get the default ruby on rails page.
  • you need an IDE (I prefer Aptana for rails, Eclipse for Java, and vim editor for php and python :-) )

Deployment

Deployment process is meant to make your development process more comfortable, know who did what, keep track of code revisions and safely rollback to any revision of the software – simply ensure your product is stable in production (that is in front of your customers), and maintainable.

on the other hand, you need to have software configuration system that is to manage source code revisions, smoothly aggregate multi-developers work and have a better rollback process.

speaking web application is meant to run into an application server, that will serve your users request, for ruby on rails, I will set up apache http server with Phusion (know as mod_rails) on next article.pro

Common saying: “most projects failures is management failures”, well, the first step is to get yourself organized.

have a nice and organized coding!

concepts, linux, Ruby and Ruby On Rails, System Administration , , , , , ,

2 responses to starting a software project – ror as example


  1. i would highly recommend to use RVM …. its a fantastic tool to maintain multiple ruby/rails versions https://rvm.beginrescueend.com/

    • Osama

      yes, that is a tool that can be used but it would add its own hassle, unless you tell me otherwise.
      it would be great if you write about it from your experience.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>