跳到主要內容

Error message of "rake" command:「`block in non_options': file not found: environment (ArgumentError)」

前一篇有使用到了 shoulda 這個 gem lib 來幫助測試。Shoulda 有一個 open issue 是尚未解決的,這個 bug 會使得執行 rake 相關指令時出現下列錯誤訊息:

$ rake environment

/Users/<username>/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:167:in `block in non_options': file not found: routes (ArgumentError)
 from /Users/<username>/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:146:in `map!'
 from /Users/<username>
/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:146:in `non_options'
 from /Users/<username>
/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:207:in `non_options'
 from /Users/<username>
/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:52:in `process_args'
 from /Users/<username>
/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/minitest/unit.rb:891:in `_run'
 from /Users/<username>
/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/minitest/unit.rb:884:in `run'
 from /Users/<username>
/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:21:in `run'
 from /Users/<username>
/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:326:in `block (2 levels) in autorun'
 from /Users/<username>
/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:27:in `run_once'
 from /Users/<username>
/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:325:in `block in autorun' 
 
 
Shoulda 很久沒人維護了~
建議把 shoulda 依需求換成 shoulda-matchers 或者 shoulda-contex 即可解決這個問題 
Shoulda 最後也就是用了 shoulda-matchers 或 shoulda-context,可以就直接使用原本的 gem  

留言

這個網誌中的熱門文章

[lyrics] Imagine

Title: Imagine Artist: John Lennon Imagine there's no Heaven It's easy if you try No hell below us Above us only sky Imagine all the people Living for today Imagine there's no countries It isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace You may say that I'm a dreamer But I'm not the only one I hope someday you'll join us And the world will be as one Imagine no possessions I wonder if you can No need for greed or hunger A brotherhood of man Imagine all the people Sharing all the world You may say that I'm a dreamer But I'm not the only one I hope someday you'll join us And the world will live as one ----------------------------- 這首歌和歌詞是早就知道的,最近又再次聽起它並認真的讀了歌詞 真的,很感動,多麼美好的世界~ (遠目) 真的也無法形容浮現在腦中的畫面.... 只能用心來感受它吧! 同樣的東西在不同的時間下會有新的,全然不同的感受.... 也有許多事情,是要親自走過、痛過、經歷過,才能了解那份感受 寫這個沒什麼意義,只是紀錄當下的感覺罷了!

白揚瀑布

 

健保卡代號

IC卡載入後,欄位代碼之表示為: *(1)代表「同意器官捐贈,不同意安寧緩和醫療」 *(4)代表「同意器官捐贈,同意安寧緩和醫療,同意不 施行心肺復甦術」 *(7)代表「不同意器官捐贈,同意安寧緩和醫療,同意 不施行心肺復甦術」 *未註記 p.s: 今天看牙醫順便請醫生幫我看一下,醫生說是代號(4),簽成功了 :) ref: http://www.tho.org.tw/xms/read_attach.php?id=259