[問題] 想把array和hash輸出成property list
(ctrl + y 刪去不必要的行列)
環境:
1.9.3
狀況:
我想要將Array和Hash所包含的字串轉換成Property List
附錄:
我有一個小程式d2p.rb去讀取檔案目錄, 然後抓出
在該資料夾中的每一個檔案名稱。然後我在GitHub上找到這個專案
https://github.com/bleything/plist
下載下來之後把裡面的plist.rb檔與plist資料夾和d2p.rb
檔案放在一起之後在d2p.rb中加上require "./plist.rb"。
但執行d2p.rb時卻產生下面的錯誤訊息
/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/
custom_require.rb:36:in `require': cannot load such file -- plist/generator (LoadError)
from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/
custom_require.rb:36:in `require'
from /Users/Dan/Documents/Ruby/plist.rb:16:in `<top (required)>'
from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/
custom_require.rb:36:in `require'
from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/
custom_require.rb:36:in `require'
from directory_to_plist.rb:1:in `<main>'
想請問我到底哪裡用錯了@@
謝謝!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.240.193.155
推
03/01 22:55, , 1F
03/01 22:55, 1F
→
03/01 22:58, , 2F
03/01 22:58, 2F
→
03/01 22:58, , 3F
03/01 22:58, 3F
→
03/01 23:00, , 4F
03/01 23:00, 4F
→
03/01 23:01, , 5F
03/01 23:01, 5F
推
03/01 23:01, , 6F
03/01 23:01, 6F
→
03/02 09:53, , 7F
03/02 09:53, 7F
→
03/02 15:40, , 8F
03/02 15:40, 8F
Ruby 近期熱門文章
PTT數位生活區 即時熱門文章