In developing the e-CRM, I have found the following helper methods very useful :-
a) Hardcoded select list
def severity_form_column (record, name)
select_tag name, options_for_select(%w(Show-stopper Severe Nice-to-have Customisation Trivial), record.severity)
end
b) TextArea for edit/create
def blog_form_column(record, input_name) text_area_tag('record[blog]', @record.blog, :size=>"80x30")
end
c) checkbox for edit/create
def active_form_column(record, input_name)
check_box :record, :active, :name => input_name
end
e) checkbox for list
def active_column(record)
check_box_tag 'active', 1, record.active?, { :disabled => true }
end
f) date display for list
def bill_date_column(record)
if record.bill_date.nil?
record.bill_date= '-' #'' '
else
record.bill_date.strftime("%d/%m/%y")
end
end
g) Customising Rails date format
def mydate_form_column(record, input_name)
date_select(:record, :mydate :order =>
[:day, :month, :year], :start_year => 1970, :end_year => 2000)
end
h) Controlling Text Field Size
def name_form_column(record, input_name)
text_field_tag('record[name]', @record.name, { :autocomplete => "off", :size => 40, :class => 'text-input'})
end
Chee Chong Hwa aka CCH, a Malaysian Chief Software Architect blogs on his experiences with Ruby on Rail running on Win2003 Server+Apache 2.26 environment since 2007. Flirted briefly with Ubuntu 9.04 in 2009. Since January 2017, now using RubyMine IDE/Notepad++ to work with Ruby 2.26 +Rails 5.01+Apache 2.4.23 + MySQL 5.7.14 on Windows 10 64-bits.
Wednesday, October 31, 2007
Sunday, October 28, 2007
Advanced Rails : Why you should not use Global Variables ! [Updated 12th Sept 2009]
What are global variables in Ruby ?
A global variable has a name beginning with $. It can be referred to from anywhere in a program. Before initialization, a global variable has the special value nil.
Global variables should be used sparingly. They are dangerous because they can be written to from anywhere. Overuse of globals can make isolating bugs difficult; it also tends to indicate that the design of a program has not been carefully thought out. Whenever you do find it necessary to use a global variable, be sure to give it a descriptive name that is unlikely to be inadvertently used for something else later (calling it something like $foo as above is probably a bad idea).
When a global variable has been rigged to work as a trigger to invoke a procedure whenever changed, we sometimes call it an active variable. For instance, it is useful for keeping a GUI display up to date.
There is a collection of special variables whose names consist of a dollar sign ($) followed by a single character. For example, $$ contains the process id of the ruby interpreter, and is read-only. Here are the major system variables and their meanings (see the ruby reference manual for details):
$! latest error message
$@ location of error
$_ string last read by gets
$. line number last read by interpreter
$& string last matched by regexp
$~ the last regexp match, as an array of subexpressions
$n the nth subexpression in the last match (same as $~[n])
$= case-insensitivity flag
$/ input record separator
$\ output record separator
$0 the name of the ruby script file
$* the command line arguments
$$ interpreter's process ID
$? exit status of last executed child process
In the above, $_ and $~ have local scope. Their names suggest they should be global, but they are much more useful this way, and there are historical reasons for using these names.
Why you should not not use Global Variables
Let us assume that on login (say using Acts As Authenticated), you may be tempted to initialise say $is_admin = current_user.isadmin and then use $is_admin to control access to modules or whatever. This will work very nicely in development mode or even production mode under say Apache 2.x + 1 mongrel process.
However, once you use Apache 2.2x + a pack of mongrel processes, your security measure will fail miserably ! Why ?
Prior to using Apache+a pack of mongrels, I was succesfully using a home-made role-based authentication in conjunction with AAA.
What I did basically was to add roles in users (AAA table) via adding fields (such as is_admin, is_marketing, is_finance etc). The result is that a user can can have one or many roles.
With this concept, I could control access to modules using layouts and within each controller or model I can control access to specific actions.
1. Control access to specific actions via controller.
EXAMPLE in customers_controller.rb
layout 'customers'
active_scaffold :customer do config
if User.current_user.is_admin
config.nested.add_link("Receivables", [:receivables])
end
2. Control access to specific actions via model
has_many :receivables
def authorized_for_update?
current_user.is_finance
end
def authorized_for_destroy?
current_user.is_admin
end
Using 1-3 works perfectly on Apache+1 mongrel on a Windows 2003. But once I activate Apache + 2 or mongrels, the whole security system got thrashed !
Response from Jan (Mongrel FAQ)
Globals are not shared across different instance of mongrel. To have a global appear in all instances you need some form of permanent storage (filesystem or database). If it doesn't need to change over the lifetime of the program you can pass in the global at startup in an environment variable.
You would not want to use a global in this case, since it needs to change after start up and the other mogrels would not be aware of the change. Use permanent storage. File system, database, or perhaps even a cookie
Response from Luis (author of mongrel windows service)
As Jan pointed, global variables aren't shared across processes.
You need rely your authorization schema in something else instead a global variable, since 2 users could hit the same mongrel instance and both get great as admin.
You need to investigate further about authorization schemas and how session is handled (and could be used for your purpose).
First you need to move your session storage to ActiveRecord or cookie based (in case of 1.2.5 or edge). Then I suggest you take a look at the following plugins for Authentication:
RESTful Authentication:
http://railsify.com/plugins/3-restful-authentication
Acts as Authenticated: http://technoweenie.stikipad.com/plugins/show/Acts+as+Authenticated
Later you will need some role management (to handle is_admin?) Take a look at the suggestion and the "Elsewhere" part from the Acts as Authenticated stikipad page.
My solution was to use the role_requirement plugin by Tim Harper.
This link is also relevant to our discussion here.
A global variable has a name beginning with $. It can be referred to from anywhere in a program. Before initialization, a global variable has the special value nil.
Global variables should be used sparingly. They are dangerous because they can be written to from anywhere. Overuse of globals can make isolating bugs difficult; it also tends to indicate that the design of a program has not been carefully thought out. Whenever you do find it necessary to use a global variable, be sure to give it a descriptive name that is unlikely to be inadvertently used for something else later (calling it something like $foo as above is probably a bad idea).
When a global variable has been rigged to work as a trigger to invoke a procedure whenever changed, we sometimes call it an active variable. For instance, it is useful for keeping a GUI display up to date.
There is a collection of special variables whose names consist of a dollar sign ($) followed by a single character. For example, $$ contains the process id of the ruby interpreter, and is read-only. Here are the major system variables and their meanings (see the ruby reference manual for details):
$! latest error message
$@ location of error
$_ string last read by gets
$. line number last read by interpreter
$& string last matched by regexp
$~ the last regexp match, as an array of subexpressions
$n the nth subexpression in the last match (same as $~[n])
$= case-insensitivity flag
$/ input record separator
$\ output record separator
$0 the name of the ruby script file
$* the command line arguments
$$ interpreter's process ID
$? exit status of last executed child process
In the above, $_ and $~ have local scope. Their names suggest they should be global, but they are much more useful this way, and there are historical reasons for using these names.
Why you should not not use Global Variables
Let us assume that on login (say using Acts As Authenticated), you may be tempted to initialise say $is_admin = current_user.isadmin and then use $is_admin to control access to modules or whatever. This will work very nicely in development mode or even production mode under say Apache 2.x + 1 mongrel process.
However, once you use Apache 2.2x + a pack of mongrel processes, your security measure will fail miserably ! Why ?
Prior to using Apache+a pack of mongrels, I was succesfully using a home-made role-based authentication in conjunction with AAA.
What I did basically was to add roles in users (AAA table) via adding fields (such as is_admin, is_marketing, is_finance etc). The result is that a user can can have one or many roles.
With this concept, I could control access to modules using layouts and within each controller or model I can control access to specific actions.
1. Control access to specific actions via controller.
EXAMPLE in customers_controller.rb
layout 'customers'
active_scaffold :customer do config
if User.current_user.is_admin
config.nested.add_link("Receivables", [:receivables])
end
2. Control access to specific actions via model
has_many :receivables
def authorized_for_update?
current_user.is_finance
end
def authorized_for_destroy?
current_user.is_admin
end
Using 1-3 works perfectly on Apache+1 mongrel on a Windows 2003. But once I activate Apache + 2 or mongrels, the whole security system got thrashed !
Response from Jan (Mongrel FAQ)
Globals are not shared across different instance of mongrel. To have a global appear in all instances you need some form of permanent storage (filesystem or database). If it doesn't need to change over the lifetime of the program you can pass in the global at startup in an environment variable.
You would not want to use a global in this case, since it needs to change after start up and the other mogrels would not be aware of the change. Use permanent storage. File system, database, or perhaps even a cookie
Response from Luis (author of mongrel windows service)
As Jan pointed, global variables aren't shared across processes.
You need rely your authorization schema in something else instead a global variable, since 2 users could hit the same mongrel instance and both get great as admin.
You need to investigate further about authorization schemas and how session is handled (and could be used for your purpose).
First you need to move your session storage to ActiveRecord or cookie based (in case of 1.2.5 or edge). Then I suggest you take a look at the following plugins for Authentication:
RESTful Authentication:
http://railsify.com/plugins/3-restful-authentication
Acts as Authenticated: http://technoweenie.stikipad.com/plugins/show/Acts+as+Authenticated
Later you will need some role management (to handle is_admin?) Take a look at the suggestion and the "Elsewhere" part from the Acts as Authenticated stikipad page.
My solution was to use the role_requirement plugin by Tim Harper.
This link is also relevant to our discussion here.
Saturday, October 27, 2007
Rails Basics : All about Validations
Irrespective of languages, frameworks and platforms, one cannot run away from providing validations to data input. How does Ruby on Rails do it ?
To be precise, Active Record, an integral part of RoR, provides validation support as follows :-
a) validates_acceptance_of(attribute, :message => "message", :accept => "1")
b) validates_confirmation_of(attribute, :message => "message")
c) validates_exclusion_of(attribute, :in => enumerable_object, :message => "message")
d) validates_inclusion_of(attribute, :in => enumerable_object, :message => "message")
e) validates_length_of(attribute, :maximum => max, :allow_nil => true, :message => "message")
f) validates_length_of(attribute, :minimum => min, :message => "message")
g) validates_length_of(attribute, :in => range, :message => "message")
h) validates_numericality_of(value, :message => "message")
i) validates_presence_of(attributes, :message => "message")
j) validates_size_of(attribute, :maximum => max, :message => "message")
k) validates_size_of(attribute, :minimum => min, :message => "message")
l) validates_size_of(attribute, :in => range, :message => "message")
m) validates_uniqueness_of(attributes, :message => "message", :scope => "condition")
n) validates_uniqueness_of(attributes, :message => "message", :scope => "condition")
To be precise, Active Record, an integral part of RoR, provides validation support as follows :-
a) validates_acceptance_of(attribute, :message => "message", :accept => "1")
b) validates_confirmation_of(attribute, :message => "message")
c) validates_exclusion_of(attribute, :in => enumerable_object, :message => "message")
d) validates_inclusion_of(attribute, :in => enumerable_object, :message => "message")
e) validates_length_of(attribute, :maximum => max, :allow_nil => true, :message => "message")
f) validates_length_of(attribute, :minimum => min, :message => "message")
g) validates_length_of(attribute, :in => range, :message => "message")
h) validates_numericality_of(value, :message => "message")
i) validates_presence_of(attributes, :message => "message")
j) validates_size_of(attribute, :maximum => max, :message => "message")
k) validates_size_of(attribute, :minimum => min, :message => "message")
l) validates_size_of(attribute, :in => range, :message => "message")
m) validates_uniqueness_of(attributes, :message => "message", :scope => "condition")
n) validates_uniqueness_of(attributes, :message => "message", :scope => "condition")
Saturday, October 20, 2007
Rails Basics : I am a newbie, what should I read ?
Just like thousands of experienced programmers who have flocked to Ruby after seeing the incredible demo on how easy it was to create a Ruby on Rails Applications, I started on RoR and after a short while, I hit a road block :-(
What did I do next ?
Consistent with I did when I started by programming career via Clipper, I went to my favourite bookshop and bought all the Rails and Ruby Books available.
What I bought include :-
Updated on 30th August 2009
Programming Ruby
The Rails Way
Rails Space
Rails for .NET Developers (August, 2009)
What did I do next ?
Consistent with I did when I started by programming career via Clipper, I went to my favourite bookshop and bought all the Rails and Ruby Books available.
What I bought include :-
- Dummies Guide to Ruby and Rails
- Rails Cookbook
- Ruby Cookbook
- Rails Solution
- Agile Web Development with Rails
- Ruby on Rails : Up and Running
- Rails Recipes
- The Ruby Way : 2nd Edition
- Active Record
Updated on 30th August 2009
Programming Ruby
The Rails Way
Rails Space
Rails for .NET Developers (August, 2009)
Saturday, October 13, 2007
Migration : Upgrading Rails from 1.2.3 to 1.2.5
Being adventurous having my first Rails appplication in production since August 2007, I read about the impending Rails 2.0 release. As I understand it, there was to be a 1.2.4 release and it was supposed to be mostly made up of security fixes and deprecation notices that will help you prepare for Rails 2.0.
Being cautious, I froze Rails 1.2.3 into the Vendor Directory using rake:freeze:gems.
Then I gem install rails --include-dependencies
Surprise...Surprise, the update is to Rails 1.2.5 !
D:\Aptana_Workspace\crm4web>gem install rails --include-dependencies
Need to update 22 gems from http://gems.rubyforge.org
......................
complete
Successfully installed rails-1.2.5
Successfully installed activesupport-1.4.4
Successfully installed activerecord-1.15.5
Successfully installed actionpack-1.13.5
Successfully installed actionmailer-1.3.5
Successfully installed actionwebservice-1.2.5
Installing ri documentation for activesupport-1.4.4...
Installing ri documentation for activerecord-1.15.5...
Installing ri documentation for actionpack-1.13.5...
Installing ri documentation for actionmailer-1.3.5...
Installing ri documentation for actionwebservice-1.2.5...
Installing RDoc documentation for activesupport-1.4.4...
Installing RDoc documentation for activerecord-1.15.5...
Installing RDoc documentation for actionpack-1.13.5...
Installing RDoc documentation for actionmailer-1.3.5...
Installing RDoc documentation for actionwebservice-1.2.5...
Result :
Tested on a blank project (Radrails+Windows 2003 server) created using Rails 1.2.3
Can display the Std index.htm but on clicking the "About Your Application's Environment", the following error message was shown
"Routing Error, no route found to match /rails/info/properties with (:method :Get)
I then created a new project under Rails 1.25 and on clicking the "About Your Application's Environment"
About your application’s environment
Ruby version 1.8.6 (i386-mswin32)
RubyGems version 0.9.2
Rails version 1.2.5
Active Record version 1.15.5
Action Pack version 1.13.5
Action Web Service version 1.2.5
Action Mailer version 1.3.5
Active Support version 1.4.4
Application root D:/Aptana_Workspace/test-125
Environment development
Database adapter mysql
Worried about the impact on my Production Apps, I committed to SVN, unfroze and ran the app under Rails 1.2.5 and voila no problems :-)
BTW, I was just just informed of this link :-
http://weblog.rubyonrails.org/2007/10/12/rails-1-2-5-maintenance-release
which recommends as follows :-
To upgrade, `
gem install rails`,
set RAILS_GEM_VERSION to ‘1.2.5’ in config/environment.rb, and
`rake rails:update:configs`.
Updated on 18th October 2007
An example of a deprecation woud be
record_type => record.type.name
which will genenerate a
warning: Object#type is deprecated; use Object#class
Solution : record_type => record.class.name
Being cautious, I froze Rails 1.2.3 into the Vendor Directory using rake:freeze:gems.
Then I gem install rails --include-dependencies
Surprise...Surprise, the update is to Rails 1.2.5 !
D:\Aptana_Workspace\crm4web>gem install rails --include-dependencies
Need to update 22 gems from http://gems.rubyforge.org
......................
complete
Successfully installed rails-1.2.5
Successfully installed activesupport-1.4.4
Successfully installed activerecord-1.15.5
Successfully installed actionpack-1.13.5
Successfully installed actionmailer-1.3.5
Successfully installed actionwebservice-1.2.5
Installing ri documentation for activesupport-1.4.4...
Installing ri documentation for activerecord-1.15.5...
Installing ri documentation for actionpack-1.13.5...
Installing ri documentation for actionmailer-1.3.5...
Installing ri documentation for actionwebservice-1.2.5...
Installing RDoc documentation for activesupport-1.4.4...
Installing RDoc documentation for activerecord-1.15.5...
Installing RDoc documentation for actionpack-1.13.5...
Installing RDoc documentation for actionmailer-1.3.5...
Installing RDoc documentation for actionwebservice-1.2.5...
Result :
Tested on a blank project (Radrails+Windows 2003 server) created using Rails 1.2.3
Can display the Std index.htm but on clicking the "About Your Application's Environment", the following error message was shown
"Routing Error, no route found to match /rails/info/properties with (:method :Get)
I then created a new project under Rails 1.25 and on clicking the "About Your Application's Environment"
About your application’s environment
Ruby version 1.8.6 (i386-mswin32)
RubyGems version 0.9.2
Rails version 1.2.5
Active Record version 1.15.5
Action Pack version 1.13.5
Action Web Service version 1.2.5
Action Mailer version 1.3.5
Active Support version 1.4.4
Application root D:/Aptana_Workspace/test-125
Environment development
Database adapter mysql
Worried about the impact on my Production Apps, I committed to SVN, unfroze and ran the app under Rails 1.2.5 and voila no problems :-)
BTW, I was just just informed of this link :-
http://weblog.rubyonrails.org/2007/10/12/rails-1-2-5-maintenance-release
which recommends as follows :-
To upgrade, `
gem install rails`,
set RAILS_GEM_VERSION to ‘1.2.5’ in config/environment.rb, and
`rake rails:update:configs`.
Updated on 18th October 2007
An example of a deprecation woud be
record_type => record.type.name
which will genenerate a
warning: Object#type is deprecated; use Object#class
Solution : record_type => record.class.name
Thursday, October 11, 2007
Advanced Rails : Moving an Existing Database to a Rails Application
Assuming that you have an existing application that you wish to rewrite in Rails, how would you prepare your database schema so that you can take advantage of the magick of db:migrate ?
Well, I had to do exactly that when I decided to rewrite an existing 200+tables CRM solution into e-CRM, a Rails application. This is what I did :-
a) Pluralize all the table names
Tip: One legacy table was named customer. To pluralize it to customers whilst retaing the data, I use CREATE TABLE customers SELECT * FROM customer for MySQL
b) Add an id field (auto-increment, integer) to every table
c) Add created_at, updated_at in every table to take advantage of Rails automatic updating of these fields without a single line of code
d) Added another magic column ie lock_version (must default to 0) to invoke optimistic locking
e) To support a belongs_to relationship, add belongs_to_tablename
f) Create a schema_info table with just 1 field ie Version, Integer and add a single record with the value=1
g) Use Rake db:schema:dump to create a schema.rb based on the underlying database schema . See following snapshot of Radrails in action
h) Create an empty migration file say 001_migrate2mysql and copy the contents to the Self.Up Method as shown in the Radrails snapshot as follows :-Well, I had to do exactly that when I decided to rewrite an existing 200+tables CRM solution into e-CRM, a Rails application. This is what I did :-
a) Pluralize all the table names
Tip: One legacy table was named customer. To pluralize it to customers whilst retaing the data, I use CREATE TABLE customers SELECT * FROM customer for MySQL
b) Add an id field (auto-increment, integer) to every table
c) Add created_at, updated_at in every table to take advantage of Rails automatic updating of these fields without a single line of code
d) Added another magic column ie lock_version (must default to 0) to invoke optimistic locking
e) To support a belongs_to relationship, add belongs_to_tablename
f) Create a schema_info table with just 1 field ie Version, Integer and add a single record with the value=1
g) Use Rake db:schema:dump to create a schema.rb based on the underlying database schema . See following snapshot of Radrails in action
That's it !
Updated on 4th November, 2007.
Sunday, October 7, 2007
Active Scaffold : Roll your own form_ui ?
In the trunk version or the soon-to-be released 1.1 release, we can configure columns, on a per controller basis, such as :select, :calendar, :textarea and :checkbox but what about :text_input ?
Previously, to control the width of a given text-input column, I had to put in the helper something like this either in application.rb or controller_helper.rb
def faq_form_column(record, input_name)
text_field_tag('record[faq]', @record.faq, { :autocomplete => "off", :size => 60, :class => 'text-input'})
end
Now, I can do this :-
config.columns[:biz_name].options = { :autocomplete => "off", :size => 30, :class => 'text-input'}
config.columns[:biz_name].form_ui = :tex-input
How is this done ? Simple, just add this method once in applcation_helper.rb
def active_scaffold_input_tex-input(column, options)
text_field :record, column.name, options
end
Yes, you can roll your own form.ui :-)
Previously, to control the width of a given text-input column, I had to put in the helper something like this either in application.rb or controller_helper.rb
def faq_form_column(record, input_name)
text_field_tag('record[faq]', @record.faq, { :autocomplete => "off", :size => 60, :class => 'text-input'})
end
Now, I can do this :-
config.columns[:biz_name].options = { :autocomplete => "off", :size => 30, :class => 'text-input'}
config.columns[:biz_name].form_ui = :tex-input
How is this done ? Simple, just add this method once in applcation_helper.rb
def active_scaffold_input_tex-input(column, options)
text_field :record, column.name, options
end
Yes, you can roll your own form.ui :-)
Saturday, October 6, 2007
Rails IDE: I can't imagine why some people keep promoting Aptana
In a post on borland.public.3rdrail.ide, Joe McGlyn, Product Development Manager at CodeGear made this comment in response to one of my post.
Joe :
I've spent the past few days trying to use RadRails (the newest M7 from > Aptana). I'm certainly strongly biased toward 3rdRail
CCH: This is to be expected, no worries :-)>
Joe:
but I'm reasonably objective too. If someone points out a bug or >shortcoming in 3rdRail that is valid I'm inclined to agree. Example: Diego's questions about our debugger -- it's weak. Got it, we'll have something that will rock in our December update.
CCH: I have noticed that in your response to my posts. That's why I respect you.
Joe : I can't imagine why some people keep promoting Aptana.
CCH: I think they promote RdRails rather than AptanaBTW, I will start to compile from the various posts why they do that ...and post it on my Rails Blog.
Joe : First, code completion: Method completion fails with a null pointer exception EVERYWHERE. I created a new project, re-installed the IDE, made sure the paths to the Ruby interp. and Rails + Rake commands were set right and it still fails everywhere. I've tried simple cases like "self." in controllers and actions, and modelname. in views, they all fail.
CCH:Just type self.+ctrl+space and a list was displayed (with no errors)Please do not be offended but did you install properly. There is an article on my blog "Rails...Rails...Rails"at http://cch4rails.blogspot.com/ which went live only yesterday and yes 3rdRail is also promoted.
Joe: The usage model is weak. Having to go to a combo box on a tabbed pane is lame. Having separate panes for installing a plugin
CCH: I agree on the inflexibility of installing plugins from unregistered sources vs. running a rake taskcch: I like the Rake Tasks Tab as I find it very convenientvs. running a generator is really week.
CCH: I prefer 3rdRail's Model wizard but the generate tab does have a destroy option which can roll back a controller/model which was requested in the 3rdRail FieldTest but I am not sure whether this has been implemented
Joe : It's a poor usage model, way less effective than working from the OS command line. There also isn't a keystroke to get to these magic views so everything is mouse-based.
CCH: This has not bothered me at all :-)>
Joe :Never mind that the "generator" combo box is buggy (after a bit of usage it's empty and I have to re-start)
CCH: I also find this mildly annoying but you do not have to restart, just click the Refresh icon on the top LH corner of the Generator Tab
Joe : The "gem manager" doesn't have any way I can find to install a plugin (install is always greyed out). I can't install a gem from a specific URL or svn tag (so, for example, it's useless for getting the Rails 2.0 > preview release) I can't add additional repositories to install gems from. Like most of the UI it ends up being a lot less useful than the command line.
CCH: I have just done that whilst installing the ibRuby Gem :-)See my latest article on Interbase at "Rails...Rails..Rails"
Joe : At first glance the debugger seems promising, and they have a list of refactorings, although most don't look that useful for Rails development.
Based on my research on comments made in popular RoR-related groups, this why some people keep promoting Aptana radrails
1) Tim Harper (Project Member : Active Scaffold) , 30th Sept 2007
Lemme chime in here and say I love aptana radrails.
I tried 3rdRail, and it felt "clunky". The code complete is excellent in it, but it's also pretty slow.
Aptana's code complete, go to declaration, combined with eclipse's textual complete are great enough for me.
Plus, radrails gives you a neat little tool for running unit tests that kicks the pants off running them in a console window
http://groups.google.com/group/activescaffold/browse_thread/thread/afed31fe981b6fe6/30e6785209ce5c73#30e6785209ce5c73
2. Josh
So it was definitely a ruby version issue. For some reason I was still running verion 1.8.2. I just upgraded to 1.8.6 and adjusting the aptana to work with it and now its working beautifully.
I'm willing to bet the other guy with the mac is running an older version as well.
http://groups.google.com/group/activescaffold/browse_thread/thread/9dba7977c325e9f0/95ce778341d5c154?lnk=gst&q=Aptana&rnum=14#
3) Patrick Aljord (8th March 2007)
RadRails is the best free IDE out there for RubyOnRails development and it's easy for companies to integrate it into their development platforms as it it's based on Eclipse.
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/73dd6d73752aa09b/59504f9e3488b88c?lnk=gst&q=radrails&rnum=3#59504f9e3488b88c
4) Chris Bloom (29th September 2007)
I'm using RadRails since I can't spring $2049 for TextMate (and accompanying Mac). I've also tested the "e" editor, and otherwise have used EditPlus.
RadRails is a nice balance of a compact work space, console/logger, and syntax hilighter. I also like its Auto-completion functionality, but it's anywhere from complete OR consistent. And it's preferences panel leaves much to be desired. Then again, it is still a beta release so you have to take some of those problems in context. I look forward to future releases.
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/fc4ec10f4767e4aa/0cf12c2fd2e323e9?q=radrails&lnk=nl&
5) John Lane (24th Sept 2007)
Hmm, I'd never heard of 3rdRail so I just checked it out: it appears to be a commercial product.
I personally use Aptana and, yes it has its issues but I think it's better to support an open source initiative with a donation than walk off to a close source solution.
However, if 3rdRail is streets ahead of Aptana then it may be worth paying for. So, what does it give that Aptana doesn't
6) Dr Nic (6th Nov 2006)
RadRails is a wonderful IDE for developing Rails/Ruby, and supports a similar auto-completion mechanism to TextMate's snippets, called templates. You activate them by typing a portion of the template name, and pressing CTRL-SPACE.
But RadRails doesn't come with many templates for Rails development.
I've just finished porting all the TextMate snippets across to RadRails - about 250 of them. I hope they are useful to other RadRails developers!
http://drnicwilliams.com/2006/11/06/post-halloween-radrails-trick-all-textmate-snippets-available/
Nic
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/9dbdeb357234c895/a1f35635bb6441fb?lnk=gst&q=radrails&rnum=23#a1f35635bb6441fb
7) Jay Levitt (1st Oct 2007)
integration support. Both RadRails and 3rdRail use the Subclipse plugin (though I suppose either could be made to use Subversive instead), so you'll see no differences between them.
I'm fairly happy with Subclipse; it's a bit finicky, and there are some cases (reverting, especially) where it's much slower than the command line, but the integration with the core Eclipse feature set is really nice - the ability to see in your project which files need updating, the Synchronize mode, and especially Mylyn's ability to automatically create separate changesets for each of your to-do tasks. Two of my favorite features are the Eclipse Compare Editor graphical merge view and the "Quick Diff" annotation bar[2] (which colors the line-number field for each line based on revision number and author, making it easy to find change groups).
The Subclipse maintainer is also on the core Subversion team, so I'd expect Subclipse to have terrific support for the cool new upcoming features in 1.5, like first-class changesets and merge tracking. In fact, he's blogged about a GUI merge-tracking client he's been working on[3].
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/be1f7ce2af0a5f18/1b0e136ee6b6adb1?lnk=gst&q=radrails&rnum=60#1b0e136ee6b6adb1
Joe :
I've spent the past few days trying to use RadRails (the newest M7 from > Aptana). I'm certainly strongly biased toward 3rdRail
CCH: This is to be expected, no worries :-)>
Joe:
but I'm reasonably objective too. If someone points out a bug or >shortcoming in 3rdRail that is valid I'm inclined to agree. Example: Diego's questions about our debugger -- it's weak. Got it, we'll have something that will rock in our December update.
CCH: I have noticed that in your response to my posts. That's why I respect you.
Joe : I can't imagine why some people keep promoting Aptana.
CCH: I think they promote RdRails rather than AptanaBTW, I will start to compile from the various posts why they do that ...and post it on my Rails Blog.
Joe : First, code completion: Method completion fails with a null pointer exception EVERYWHERE. I created a new project, re-installed the IDE, made sure the paths to the Ruby interp. and Rails + Rake commands were set right and it still fails everywhere. I've tried simple cases like "self." in controllers and actions, and modelname. in views, they all fail.
CCH:Just type self.+ctrl+space and a list was displayed (with no errors)Please do not be offended but did you install properly. There is an article on my blog "Rails...Rails...Rails"at http://cch4rails.blogspot.com/ which went live only yesterday and yes 3rdRail is also promoted.
Joe: The usage model is weak. Having to go to a combo box on a tabbed pane is lame. Having separate panes for installing a plugin
CCH: I agree on the inflexibility of installing plugins from unregistered sources vs. running a rake taskcch: I like the Rake Tasks Tab as I find it very convenientvs. running a generator is really week.
CCH: I prefer 3rdRail's Model wizard but the generate tab does have a destroy option which can roll back a controller/model which was requested in the 3rdRail FieldTest but I am not sure whether this has been implemented
Joe : It's a poor usage model, way less effective than working from the OS command line. There also isn't a keystroke to get to these magic views so everything is mouse-based.
CCH: This has not bothered me at all :-)>
Joe :Never mind that the "generator" combo box is buggy (after a bit of usage it's empty and I have to re-start)
CCH: I also find this mildly annoying but you do not have to restart, just click the Refresh icon on the top LH corner of the Generator Tab
Joe : The "gem manager" doesn't have any way I can find to install a plugin (install is always greyed out). I can't install a gem from a specific URL or svn tag (so, for example, it's useless for getting the Rails 2.0 > preview release) I can't add additional repositories to install gems from. Like most of the UI it ends up being a lot less useful than the command line.
CCH: I have just done that whilst installing the ibRuby Gem :-)See my latest article on Interbase at "Rails...Rails..Rails"
Joe : At first glance the debugger seems promising, and they have a list of refactorings, although most don't look that useful for Rails development.
Based on my research on comments made in popular RoR-related groups, this why some people keep promoting Aptana radrails
1) Tim Harper (Project Member : Active Scaffold) , 30th Sept 2007
Lemme chime in here and say I love aptana radrails.
I tried 3rdRail, and it felt "clunky". The code complete is excellent in it, but it's also pretty slow.
Aptana's code complete, go to declaration, combined with eclipse's textual complete are great enough for me.
Plus, radrails gives you a neat little tool for running unit tests that kicks the pants off running them in a console window
http://groups.google.com/group/activescaffold/browse_thread/thread/afed31fe981b6fe6/30e6785209ce5c73#30e6785209ce5c73
2. Josh
So it was definitely a ruby version issue. For some reason I was still running verion 1.8.2. I just upgraded to 1.8.6 and adjusting the aptana to work with it and now its working beautifully.
I'm willing to bet the other guy with the mac is running an older version as well.
http://groups.google.com/group/activescaffold/browse_thread/thread/9dba7977c325e9f0/95ce778341d5c154?lnk=gst&q=Aptana&rnum=14#
3) Patrick Aljord (8th March 2007)
RadRails is the best free IDE out there for RubyOnRails development and it's easy for companies to integrate it into their development platforms as it it's based on Eclipse.
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/73dd6d73752aa09b/59504f9e3488b88c?lnk=gst&q=radrails&rnum=3#59504f9e3488b88c
4) Chris Bloom (29th September 2007)
I'm using RadRails since I can't spring $2049 for TextMate (and accompanying Mac). I've also tested the "e" editor, and otherwise have used EditPlus.
RadRails is a nice balance of a compact work space, console/logger, and syntax hilighter. I also like its Auto-completion functionality, but it's anywhere from complete OR consistent. And it's preferences panel leaves much to be desired. Then again, it is still a beta release so you have to take some of those problems in context. I look forward to future releases.
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/fc4ec10f4767e4aa/0cf12c2fd2e323e9?q=radrails&lnk=nl&
5) John Lane (24th Sept 2007)
Hmm, I'd never heard of 3rdRail so I just checked it out: it appears to be a commercial product.
I personally use Aptana and, yes it has its issues but I think it's better to support an open source initiative with a donation than walk off to a close source solution.
However, if 3rdRail is streets ahead of Aptana then it may be worth paying for. So, what does it give that Aptana doesn't
6) Dr Nic (6th Nov 2006)
RadRails is a wonderful IDE for developing Rails/Ruby, and supports a similar auto-completion mechanism to TextMate's snippets, called templates. You activate them by typing a portion of the template name, and pressing CTRL-SPACE.
But RadRails doesn't come with many templates for Rails development.
I've just finished porting all the TextMate snippets across to RadRails - about 250 of them. I hope they are useful to other RadRails developers!
http://drnicwilliams.com/2006/11/06/post-halloween-radrails-trick-all-textmate-snippets-available/
Nic
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/9dbdeb357234c895/a1f35635bb6441fb?lnk=gst&q=radrails&rnum=23#a1f35635bb6441fb
7) Jay Levitt (1st Oct 2007)
integration support. Both RadRails and 3rdRail use the Subclipse plugin (though I suppose either could be made to use Subversive instead), so you'll see no differences between them.
I'm fairly happy with Subclipse; it's a bit finicky, and there are some cases (reverting, especially) where it's much slower than the command line, but the integration with the core Eclipse feature set is really nice - the ability to see in your project which files need updating, the Synchronize mode, and especially Mylyn's ability to automatically create separate changesets for each of your to-do tasks. Two of my favorite features are the Eclipse Compare Editor graphical merge view and the "Quick Diff" annotation bar[2] (which colors the line-number field for each line based on revision number and author, making it easy to find change groups).
The Subclipse maintainer is also on the core Subversion team, so I'd expect Subclipse to have terrific support for the cool new upcoming features in 1.5, like first-class changesets and merge tracking. In fact, he's blogged about a GUI merge-tracking client he's been working on[3].
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/be1f7ce2af0a5f18/1b0e136ee6b6adb1?lnk=gst&q=radrails&rnum=60#1b0e136ee6b6adb1
Active Scaffold : Brief Introduction...
What happens when you have gone through the various tutorials and came away thoroughly impressed by how easy it is to develop a working RoR app ?
After a while, you will clearly decide that the default Rails Scaffolding though customisable is simply impractical. Why ? Think of a scenario where you have say a 200 tables CRM Win32 application which you are thinking of rewriting in RoR :-(
Enters Active Scaffold... In a nutshell, Active Scaffold is a Ruby on Rails plugin that dynamically creates user interfaces for your models that include your basic CRUD operations + search, a slick fully styled AJAX'ified design, and a high level of configurability. An extension of the AjaxScaffold project
After a while, you will clearly decide that the default Rails Scaffolding though customisable is simply impractical. Why ? Think of a scenario where you have say a 200 tables CRM Win32 application which you are thinking of rewriting in RoR :-(
Enters Active Scaffold... In a nutshell, Active Scaffold is a Ruby on Rails plugin that dynamically creates user interfaces for your models that include your basic CRUD operations + search, a slick fully styled AJAX'ified design, and a high level of configurability. An extension of the AjaxScaffold project
Thursday, October 4, 2007
Rails IDE : Why is 3rdRail Unique ?
This is quoted verbatim from a response to post I made in the CodeGear 3rd Rail Public News Group.
CCH: As I delve deeper into eclipse-based IDEs such as 3rdRail & Radrails, I began to realise that a lot of features that developers rave about are actually from Eclipse. I am planning to write an impartial article (at > http://cch4rails.blogspot.com/) on why 3rdRail is so special, which I believe to be true to a certain degree. As such, I would appreciate it if you list the non-eclipse features that truly distinguishes 3rdRail from other IDEs .
Joe McGlyn, Director of Product Development, CodeGear :
Top level features:
- Rails Explorer
- Project Commander
- Ruby console
- Rails console
- Dependency view
- Rails refactorings (NB claims to have refactorings for views and actions, but it fails in every test case I've tried)
- Solid code completion (FWIW, I get a null pointer exception in RadRails M7 in nearly every test case on code completion -- not template completion)
- Context-aware templates (template expansion only shows templates for the current Rails context so you don't see view templates in a controller for example)
- "open associate" navigation according to Rails' dispatch rules
CCH: As I delve deeper into eclipse-based IDEs such as 3rdRail & Radrails, I began to realise that a lot of features that developers rave about are actually from Eclipse. I am planning to write an impartial article (at > http://cch4rails.blogspot.com/) on why 3rdRail is so special, which I believe to be true to a certain degree. As such, I would appreciate it if you list the non-eclipse features that truly distinguishes 3rdRail from other IDEs .
Joe McGlyn, Director of Product Development, CodeGear :
Top level features:
- Rails Explorer
- Project Commander
- Ruby console
- Rails console
- Dependency view
- Rails refactorings (NB claims to have refactorings for views and actions, but it fails in every test case I've tried)
- Solid code completion (FWIW, I get a null pointer exception in RadRails M7 in nearly every test case on code completion -- not template completion)
- Context-aware templates (template expansion only shows templates for the current Rails context so you don't see view templates in a controller for example)
- "open associate" navigation according to Rails' dispatch rules
Wednesday, October 3, 2007
Using Interbase 2007 in Ruby on Rails Project
Joe McGlyn, Director of Product Management at CodeGear has shown the way to use Interbase 2007 in Ruby on Rails as follows :-
Assuming you already have a project, here are the basic steps to modifying a project to work with InterBase as the database...
1. Get the InterBase gem
gem install ibruby
Comments by CCH :
There are a few ways to do this
a) c:\instantrails\ruby\bin >gem install ibruby
b) In Aptana RadRails,
i) call up the Gems Manager from
Windows\show view\Ruby Gems
ii) Within the Gems Manager
- Click Install
- select ibruby Gem
You can then see the progress within the Console Tab
c) In 3rdRail, you can use the Project Commander
2. Get the Rails adapter (from the root dir of your rails app or from the project commander) script/plugin source http://ibruby.rubyforge.org/svn/rails_plugins/trunk/
script/plugin install ibrails_plugin
Comments by CCH
a) Shell to Command prompt and cd to root of your project folder
c:\project_name>ruby script/plugin source http://ibruby.rubyforge.org/svn/rails_plugins/trunk/
c:\project_name>ruby script/plugin install ibrails_plugin
b) Using Aptana Radrals,
i) select the Rails Plugins Tab
ii) select ibruby and click Go
Nb. If ibruby does not show in the list, revert to method (a) :-)
c) In 3rdRail, you can use the Project Commander
NOTE :
You will also need to add these two lines into your Rails
environment.rb file:
# ------ force InterBase support to be added to Rails
# ------ as Rails currently has no way of extending its db
# ------ support apart from a new Rails release!
require 'active_record'
require 'vendor/plugins/ibrails_plugin/lib/ibrails_plugin'
# ------
Ideally these two lines should appear after the line loading
boot.rb which typically looks like this:
require File.join(File.dirname(__FILE__), 'boot')
and before anything else gets done (particularly any
initialization)
3. Assuming you have IB installed, and have the default IB user/pwd enabled you're good to go.
It will even create the database file (within your project directory by default)
Known limitation:Indicies are limited to ~200 characters, depending on how they are composed. This is InterBase, not the integration.
Comments by CCH
Despite religously following the instructions from Joe McGlyn of CodeGear, I have not been able to overcome the barrier and error message
ie "database configuration specifies nonexistent interbase adapter"
You may want to read the thread "Using Interbase with RoR" started by Joe here borland.public.3rdrail.ide
Assuming you already have a project, here are the basic steps to modifying a project to work with InterBase as the database...
1. Get the InterBase gem
gem install ibruby
Comments by CCH :
There are a few ways to do this
a) c:\instantrails\ruby\bin >gem install ibruby
b) In Aptana RadRails,
i) call up the Gems Manager from
Windows\show view\Ruby Gems
ii) Within the Gems Manager
- Click Install
- select ibruby Gem
You can then see the progress within the Console Tab
c) In 3rdRail, you can use the Project Commander
2. Get the Rails adapter (from the root dir of your rails app or from the project commander) script/plugin source http://ibruby.rubyforge.org/svn/rails_plugins/trunk/
script/plugin install ibrails_plugin
Comments by CCH
a) Shell to Command prompt and cd to root of your project folder
c:\project_name>ruby script/plugin source http://ibruby.rubyforge.org/svn/rails_plugins/trunk/
c:\project_name>ruby script/plugin install ibrails_plugin
b) Using Aptana Radrals,
i) select the Rails Plugins Tab
ii) select ibruby and click Go
Nb. If ibruby does not show in the list, revert to method (a) :-)
c) In 3rdRail, you can use the Project Commander
NOTE :
You will also need to add these two lines into your Rails
environment.rb file:
# ------ force InterBase support to be added to Rails
# ------ as Rails currently has no way of extending its db
# ------ support apart from a new Rails release!
require 'active_record'
require 'vendor/plugins/ibrails_plugin/lib/ibrails_plugin'
# ------
Ideally these two lines should appear after the line loading
boot.rb which typically looks like this:
require File.join(File.dirname(__FILE__), 'boot')
and before anything else gets done (particularly any
initialization)
3. Assuming you have IB installed, and have the default IB user/pwd enabled you're good to go.
It will even create the database file (within your project directory by default)
Known limitation:Indicies are limited to ~200 characters, depending on how they are composed. This is InterBase, not the integration.
Comments by CCH
Despite religously following the instructions from Joe McGlyn of CodeGear, I have not been able to overcome the barrier and error message
ie "database configuration specifies nonexistent interbase adapter"
You may want to read the thread "Using Interbase with RoR" started by Joe here borland.public.3rdrail.ide
Tuesday, October 2, 2007
Rails IDE : Aptana Radrails M7 Beta - First Impressions
I am an intensive user of Aptana Radrails M5 since July 2007 and have just updated to M7.
Interface-wise, I can immediately see the following changes :-
1) Rails Navigator has been replaced by Ruby Explorer
2) 5 obviously new icons on the tool bar
a) H - switch to Helper
b) T - switch to Test
c) M - switch to Model
d) V - switch to Views
e) C- switch to Controller
Curious, I selected my favourite project and click (a) - (e), nothing happened
Then, I opened the CustomerController which looks the same as in M5
Clicking H opened module customers_helper.rb
Clicking M opened module customer.rb
Clicking V asked for which action (using AS, N/A)
Clicking T opened customer_controller_test.rb
This is very convenient, Cool :-)
3) Rails Plugin no longer automatically goto the home pages but links are clearly there thus speeding up
4) Code completion/Code Snippet when one type
val or validates+ctrl+space displays a list wnd when selected inserts
validates_presence_of(attributes, :message => "message")
5) The Ruby Explorer is great in that via a tree structure, methods hyperlinked to the actual methods. This is a nice feature absent in M5.
This article was first posted on 28th September 2007, 11:30pm on the Ruby on Rails:Talk Google Group
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/e4365a0d52403271#
Interface-wise, I can immediately see the following changes :-
1) Rails Navigator has been replaced by Ruby Explorer
2) 5 obviously new icons on the tool bar
a) H - switch to Helper
b) T - switch to Test
c) M - switch to Model
d) V - switch to Views
e) C- switch to Controller
Curious, I selected my favourite project and click (a) - (e), nothing happened
Then, I opened the CustomerController which looks the same as in M5
Clicking H opened module customers_helper.rb
Clicking M opened module customer.rb
Clicking V asked for which action (using AS, N/A)
Clicking T opened customer_controller_test.rb
This is very convenient, Cool :-)
3) Rails Plugin no longer automatically goto the home pages but links are clearly there thus speeding up
4) Code completion/Code Snippet when one type
val or validates+ctrl+space displays a list wnd when selected inserts
validates_presence_of(attributes, :message => "message")
5) The Ruby Explorer is great in that via a tree structure, methods hyperlinked to the actual methods. This is a nice feature absent in M5.
This article was first posted on 28th September 2007, 11:30pm on the Ruby on Rails:Talk Google Group
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/e4365a0d52403271#
Rails IDE : Aptana Radrails M7 Beta - Best Way To Upgrade
Just upgraded smoothly to long overdue Aptana M7 Beta which was released on 25/9/2007.
FYI, the best way to upgrade from July's M5 (M6 was skipped) is as follows :-
1) Click Help/Software Upgrades/Final and Install
2) Manually adding the following remote update site to the update manager: http://update.aptana.com/update/rails/beta/3.2/site.xml
Nb. Name the new remote site as say "Aptana M7 Update"
3) If you have any issue after upgrading, you could try to reinstall as follows :-
1) Remove the Aptana folder under C:\Documents and Settings\username\My Documents (if any)
2) Uninstall Aptana from Control Panel
3) Install from Aptana_IDE_Setup.msi
4) Goto Help\Software Updates\Find and Install
5) Accept the default Search for new features to install
6) Check Aptana M7 Beta and click Finish
This article was first posted on 28th September 2007, 10:48pm on the Ruby on Rails:Talk Google Group
Update on 4th October 2007
This is what I did to get a clean installation of RadRails
1) Uninstall va control panel
2) Delete Documents and Settings\username\mydocuments\Aptana Beta folder which contains the meta data
3) Remove the Programs\Aptana direcory
4) Install Aptana_IDE_setup.msi
Nb. You may want to chose custom and select to install JRE 1.6
I believe this is the source of your null pointer issue
5) Using Plugins Manager or Find and Install Software, install
- Radrails M7 Beta
- Subclipse
That's it
FYI, the best way to upgrade from July's M5 (M6 was skipped) is as follows :-
1) Click Help/Software Upgrades/Final and Install
2) Manually adding the following remote update site to the update manager: http://update.aptana.com/update/rails/beta/3.2/site.xml
Nb. Name the new remote site as say "Aptana M7 Update"
3) If you have any issue after upgrading, you could try to reinstall as follows :-
1) Remove the Aptana folder under C:\Documents and Settings\username\My Documents (if any)
2) Uninstall Aptana from Control Panel
3) Install from Aptana_IDE_Setup.msi
4) Goto Help\Software Updates\Find and Install
5) Accept the default Search for new features to install
6) Check Aptana M7 Beta and click Finish
This article was first posted on 28th September 2007, 10:48pm on the Ruby on Rails:Talk Google Group
Update on 4th October 2007
This is what I did to get a clean installation of RadRails
1) Uninstall va control panel
2) Delete Documents and Settings\username\mydocuments\Aptana Beta folder which contains the meta data
3) Remove the Programs\Aptana direcory
4) Install Aptana_IDE_setup.msi
Nb. You may want to chose custom and select to install JRE 1.6
I believe this is the source of your null pointer issue
5) Using Plugins Manager or Find and Install Software, install
- Radrails M7 Beta
- Subclipse
That's it
Why Rails...Rails...Rails ?
In 1995, I started the popular Clipper...Clipper... Clipper website (no blogs then) which was very popular and linked by virtually every Clipper-related site. When I switched to Windows via Delphi in 1997, I started the Delphi... Delphi... Delphi site.
In June 2007, I discovered Ruby on Rails and no prize for guessing what I am gonna name this blog :-)
BTW, I started this blog on 30th September 2007 and this is the first Rails app which is a rewrite of a 200+ tables CRM apps on the Win32 platform.
In June 2007, I discovered Ruby on Rails and no prize for guessing what I am gonna name this blog :-)
BTW, I started this blog on 30th September 2007 and this is the first Rails app which is a rewrite of a 200+ tables CRM apps on the Win32 platform.
Subscribe to:
Posts (Atom)
Welcome to Rails.. Rails... Rails !
In 1995, I started the popular Clipper...Clipper... Clipper website (no blogs then) which was very popular and linked by virtually every Clipper-related site. When I switched to Windows via Delphi in 1997, I started the Delphi... Delphi... Delphi site. In June 2007, I discovered Ruby on Rails and no prize for guessing what I am gonna name this blog. which I started on 2nd October 2007.
As at 10th June 2010, we have 13,364 unique visitors from more than 84 countries such as Angola, Andorra, Argentina, Australia, Austria, Algeria,Barbados, Bosnia and Herzogovina, Belgium, Brazil, Bulgaria, Bangladesh, Belarus, Bolivia, Chile, Cambodia, Cape Vede, Canada, China, Colombia, Costa Rica, Croatia, Cyprus, Czech Republic, Denmark, Egypt, Estonia, Finland, France, Guadeloupe, Guatemala, Germany, Greece, Hong Kong, Hungary, India, Indonesia, Ireland, Israel, Italy, Japan, Kenya, Korea, Lithuania, Latvia, Malaysia, Mexico, Macao, Netherlands, Nepal, Norway, New Zealand, Oman, Panama, Peru, Poland, Portugal,Paraguay , Philippines, Romania, Russian Federation, Saudi Arabia, Singapore, Spain, Slovakia, Slovenia, Serbia, South Korea, Slovenia, South Africa, Spain, Switzerland, Sri Lanka, Sweden, Taiwan, Thailand, Turkey, United Arab Emirates, Ukraine, USA, UK, Venezuela, Vietnam
CCH
10th June 2010, 19:42
As at 10th June 2010, we have 13,364 unique visitors from more than 84 countries such as Angola, Andorra, Argentina, Australia, Austria, Algeria,Barbados, Bosnia and Herzogovina, Belgium, Brazil, Bulgaria, Bangladesh, Belarus, Bolivia, Chile, Cambodia, Cape Vede, Canada, China, Colombia, Costa Rica, Croatia, Cyprus, Czech Republic, Denmark, Egypt, Estonia, Finland, France, Guadeloupe, Guatemala, Germany, Greece, Hong Kong, Hungary, India, Indonesia, Ireland, Israel, Italy, Japan, Kenya, Korea, Lithuania, Latvia, Malaysia, Mexico, Macao, Netherlands, Nepal, Norway, New Zealand, Oman, Panama, Peru, Poland, Portugal,Paraguay , Philippines, Romania, Russian Federation, Saudi Arabia, Singapore, Spain, Slovakia, Slovenia, Serbia, South Korea, Slovenia, South Africa, Spain, Switzerland, Sri Lanka, Sweden, Taiwan, Thailand, Turkey, United Arab Emirates, Ukraine, USA, UK, Venezuela, Vietnam
CCH
10th June 2010, 19:42