Send this to a friend
to install:
gem install cldwalker-hirb —source http://gems.github.com
1 >> require 'hirb'
2 => []
3 >> Hirb.enable
4 => nil
5 >> Exam.find(:all, :limit => 5)
6 +----+----------+----------+----------+----------+---------+----------+------+
7 | id | title | exam | creat... | updat... | user_id | categ... | hits |
8 +----+----------+----------+----------+----------+---------+----------+------+
9 | 1 | Simul... | Simul... | 2009-... | 2009-... | 1 | 1 | 152 |
10 | 2 | Simul... | Simul... | 2009-... | 2009-... | 1 | 1 | 143 |
11 | 3 | Espec... | Espec... | 2009-... | 2009-... | 1 | 1 | 1089 |
12 | 4 | Espec... | Espec... | 2009-... | 2009-... | 1 | 1 | 80 |
13 | 5 | Espec... | Espec... | 2009-... | 2009-... | 1 | 1 | 40 |
14 +----+----------+----------+----------+----------+---------+----------+------+
15 5 rows in set
16 >>
>> require 'hirb'
=> []
>> Hirb.enable
=> nil
>> Exam.find(:all, :limit => 5)
+----+----------+----------+----------+----------+---------+----------+------+
| id | title | exam | creat... | updat... | user_id | categ... | hits |
+----+----------+----------+----------+----------+---------+----------+------+
| 1 | Simul... | Simul... | 2009-... | 2009-... | 1 | 1 | 152 |
| 2 | Simul... | Simul... | 2009-... | 2009-... | 1 | 1 | 143 |
| 3 | Espec... | Espec... | 2009-... | 2009-... | 1 | 1 | 1089 |
| 4 | Espec... | Espec... | 2009-... | 2009-... | 1 | 1 | 80 |
| 5 | Espec... | Espec... | 2009-... | 2009-... | 1 | 1 | 40 |
+----+----------+----------+----------+----------+---------+----------+------+
5 rows in set
>>
Send this to a friend
install:
sudo gem install google_translate
1 require 'rubygems'
2 require 'google_translate'
3
4 tr = Google::Translate.new
5
6
7 tr.translate :from => "en", :to => "es", :text => "Hello, World!"
8 => Hola, Mundo!
require 'rubygems'
require 'google_translate'
tr = Google::Translate.new
tr.translate :from => "en", :to => "es", :text => "Hello, World!"
=> Hola, Mundo!
Send this to a friend
for install: sudo gem install cheat
+ info: http://cheat.errtheblog.com/
Send this to a friend
http://docs.rubygems.org/read/book/2
1 gem outdated # give list of gems which are outdate
2
3 gem list # list of all gems in the system with thier version number.if there was 2 version then it would give them in descending order
4
5 gem cleanup # clean the older version when there are 2 version available
6
7 gem dependency rails # list all the dependencies for a gem
8
9 gem install rails –no-rdoc # skips documentation
10
11 gem server # run in localhost:8808 rdoc documentation
12
13 gem query --remote --name-matches rails # find a gem
14
15 gem sources # list repositories
gem outdated # give list of gems which are outdate
gem list # list of all gems in the system with thier version number.if there was 2 version then it would give them in descending order
gem cleanup # clean the older version when there are 2 version available
gem dependency rails # list all the dependencies for a gem
gem install rails –no-rdoc # skips documentation
gem server # run in localhost:8808 rdoc documentation
gem query --remote --name-matches rails # find a gem
gem sources # list repositories
Send this to a friend
1 gem query --remote --name-matches rails
gem query --remote --name-matches rails