Written by Rimpy on August 22nd, 2008
I am going to dive in more serious and complex application development and for that; I need some specific approach to get reliable results. I found the answer, is UML (Unified Modeling Language). I am really interested to explore about but don’t know where to start. It is very dense area and it is extremely easy to lose in various types of different shapes defined by UML. While my research, I found an excellent guide for UML to start from. Here it is. It is a great start for beginners.
Tags: UML
Posted in My research
Written by Rimpy on August 11th, 2008
I am covering the installation of subversion and symfony on my ubuntu box. Installation of symfony will be done by PEAR library. Because latest symfony release can be pingged directly using PEAR. I will also cover the web access of subversion. I am considering apache server is already installed on your box.
To install subversion and apache module
Click here to continue reading →
Tags: apache, svn, Symfony
Posted in Linux, Symfony, Ubuntu
Written by Rimpy on May 25th, 2008
If you want to execute operating system level commands from ruby the solution is below. it’s quite easy and interesting. What would i say about the beauty of ruby here, Just thanks to ruby creators.
irb(main):001:0> system('ls -l')
total 2240
drwxr-xr-x 15 tarun tarun 24576 2008-05-21 01:33 git-1.5.5.1
-rw-r--r-- 1 tarun tarun 2002900 2008-04-21 03:47 git-1.5.5.1.tar.gz
-rw-r--r-- 1 tarun tarun 252308 2008-04-21 04:05 git-manpages-1.5.5.1.tar.gz
drwxr-xr-x 3 tarun tarun 4096 2008-05-21 09:42 ruby
=> true
irb(main):002:0>
Tags: Ruby, System command
Posted in Ruby
Written by Rimpy on May 20th, 2008
Today i found an excellent CMS based upon RubyOnRails, It’s radiant. I installed it on my ubuntu 7.10 box successfully. It was really great experience for me. I am learning ruby yet but would like to contribute for radiant development soon. Anyway will let you know when i’ll be able to release some thing useful in the favour of radiant. I would like to assist if you have any issue with radiant installation. I may help you.
Tags: Ruby, RubyOnRails, Ubuntu
Posted in Rails framework, Ruby, Ruby on rails, Ubuntu
Written by Rimpy on May 18th, 2008
Today while working with ruby i noticed one more surprising behaviour of ruby.
1
2
| arg1="Ruby", arg2="On", arg3="Rails"
puts "#{arg1},#{arg2},#{arg3}" |
What should be the results?
Well i was expecting to be printed like “Ruby”,”On”,”Rails” but the result was “RubyonRails”, “On”, “Rails”
To understand this behaviour i did some more experiments in “irb”
1
2
3
| puts arg1.class.to_s # result Array
puts arg2.class.to_s # result String
puts arg3.class.to_s # result String |
Now the question is, Why arg1 is interpreted as an array? and why not the arg2 ?
Tags: Ruby
Posted in Ruby
Written by Rimpy on May 15th, 2008
Step 1
Check if mod_rewrite and mod_proxy modules are enabled for apache. To do so put following command:
1
2
| a2enmod rewrite
a2enmod proxy |
this will enable the required modules if they are not enabled yet.
Step 2
Go to “/etc/apache2/sites-enabled/”. Open the corresponding file for which domain you want to activate rewrite module. In my case that is local server and i checked in 000-default file.
Find the following entry corresponding to your root directory
Replace this with:
With above steps i found my mod_rewrite module enabled and working sucessfully.
Tags: Ubuntu
Posted in Linux, Ubuntu
Written by Rimpy on May 5th, 2008
Since my ruby learning process, I was really surprised with POLS (Principle of least surprise). I have experience of so many langs but i never use ‘%’ operator for Strings, Arrays.
Evaluate the following expression:
1
| puts sprintf('%0.3f' % 3.351) |
results: 3.5
well i am fine with this result but what’s about single ‘%’ sign in above expression.
After some R & D, that is basically interpolating the second operand on first one. like if i do some thing.
1
2
| str_exp = "%s is going to his %s"
puts sprintf(str_exp % ["Terry","office"]) |
Results: Terry is going to his office!
Amazing now ‘%’ is operating on string and array. That’s really cool.
One more point is making me surprise about ruby.
Evaluating the following expression:
well i was expecting -2. But ruby evaluated to “1″
why?
Will do more research on that.
Tags: Ruby programming
Posted in Ruby on rails
Written by Rimpy on April 20th, 2008
Tags: Cheat sheets
Posted in General
Written by Rimpy on April 15th, 2008
Here’s the RUBY LEARNING HUB, suponsered by statish tamil. He is doing excellent job in the domain of ruby. There are some free ruby courses offered by satish. I joined 5th batch of this ruby course. that will be held on 3rd of May, 2008 to 18 of July, 2008.
Here the URL where you can join this course.
Tags: Ruby on rails, Tutorial
Posted in Ruby on rails, Tutorial