krongk krongk

View a Nokogiri demo
1 2 3 4 5 6 7 8 9 10
require 'nokogiri'
require 'open-uri'
require 'iconv'
 
# define the html url
url="http://cd.58.com/wangzhanmeigong/"
#get the nokogiri document
doc = Nokogiri::HTML(open(url))
#new a file for save
file = File.new("c:/a.html","w")
View gist:345652
1 2 3 4 5 6 7 8 9 10
This example shows how to setup an environment running Rails 3 beta under 1.9.1 with a 'rails3' gem set.
 
∴ rvm update --head
# ((Open a new shell)) or do 'rvm reload'
 
# If you do not already have the ruby interpreter installed, install it:
∴ rvm install 1.9.1
 
# Switch to 1.9.1 and gemset rails3, create if it doesn't exist.
∴ rvm --create use 1.9.1@rails3
View gist:189661
1 2 3
5.times do
p 'hello'
end
Something went wrong with that request. Please try again.