ror官方網站:http://www.rubyonrails.org/可以作為瞭解這項技術的起點,那裡面有一個15分鐘搭建一個blog的視頻很值得一看Rolling with Ruby on Rails:http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1Curt Hibbs寫的對於ror的學習過程,還沒來得及看,但是實在是太多地方reference了...隨大流吧Really Getting Started in
標籤: 查詢了大神的經驗貼http://stackoverflow.com/questions/19078044/disable-activerecord-for-rails-4http://stackoverflow.com/questions/821251/how-to-configure-ruby-on-rails-with-no-database其中點贊最多的也是我用的方法If you are creating a new application, you can use
標籤:%QThis is an alternative for double-quoted strings, when you have more quote characters in a string.Instead of putting backslashes in front of them, you can easily write:>> %Q(Joe said: "Frank said: "#{what_frank_said}"")=> "Joe said:
標籤:#enconding:utf-8require 'selenium-webdriver'require 'rspec'describe "baidu main page" doit "should have 百度一下 button on the baidu main page"dodr = Selenium::WebDriver.for:ieurl = 'www.baidu.com'dr.get
當一個方法結束工作時我們也許需要進行清理工作.也許一個開啟的檔案需要關閉,緩衝區的資料應清空等等.如果對於每一個方法這裡永遠只有一個退出點,我們可以心安理得地將我們的清理代碼放在一個地方並知道它會被執行;但一個方法可能從多個地方返回,或者因為異常我們的清理代碼被意外跳過. begin file = open("/tmp/some_file", "w") # ... write to the file ... file.close end