[Rails] Problem with installing Rails 2.3.8 on Ubuntu 10.04

2010-07-29 Thread Mars Cheng
hi, I installed the ruby-full package. After downloading the rubygems 1.3.7, I installed it without any problem. I guess it should have installed relative gems by default, such as activesupport. Any help is appreciated. Mars r...@mars-laptop:~# uname -a Linux mars-laptop 2.6.32-21-generic #32

[Rails] help! cannot display model's attr_accessor

2009-11-11 Thread mars
hi, i m new to ruby on rails, this question might sound stupid, but i m really confused by the relationship between attributes of the model and the column in that model table. i have two tables 'institutions' and 'alerts' as below: Institutions: idsite created_atupdated_at 1

[Rails] Regular Expression Grouping

2008-10-19 Thread mars
Hi! I couldn't understand the behavior of this code: match = 'Today is Feb 23rd, 2003'.match(/Feb 23(rd)?/) a = match.to_a puts a.size# 2 puts a.join(",") # Feb 23rd,rd puts a[0] # Feb 23rd puts a[1] # rd In my understanding, /F