str = "E:test/test/text.xml"
index_num = str.rindex("/")
path = str[0, index_num]
p path
File.expand_path(__FILE__) 獲取當前文件的路徑
File.dirname(File.expand_path(__FILE__)) 獲取當前文件的目錄
從rails升級到gem uninstall與gem cleanup 最近rails從1.1.6升級到了1.2.1,如果已經安裝了rails1.1.6,如何升級纔是正確的呢? 一、升級到1.2.1,並且保留1.1.6 如果不想
代碼先行class Kitty @class_ins_1 = 1 attr_accessor :ins_1, :ins_2 def initia
[b]web-app-theme[/b] 是一個用於快速開發Rails應用的後臺模板.比Django的後臺要靈活的多了.web-app-theme有點
從網上搜到的...瞭解一下Ruby的Socket編程require "socket"class IPMSGIPMSG_PORT = 2425VERSI