+ app/ #控制器、模型、視圖、幫助方法、郵件、靜態資源 + bin/ #rails腳本 + config/ #路由、數據庫等 + db/ #數據庫模式、遷移文件 + lib/ #擴展模塊 + log/ #日誌 + public/ #公共資源 + test/ #單元測試 - config.ru #Rack服務器的程序設置、用於啓動程序 - Gemfile,Gemfile.lock #指定Gem依賴,用於bundler gem - Rakefile #保存並加載可在命令行中執行的任務,可添加任務在lib/tasks中
rails new blog bundle install #gem安裝依賴
gem源切換爲 http://mirrors.aliyuncs.com/rubygems/
數據庫
gem包即ruby包,使用Bundler工具,http://bundler.io/ruby
rails server
訪問localhost:3000
服務器