<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    閑云無衣
    無衣的筆記
    原始地址:http://www.javaeye.com/topic/43500
    一.鐵道
    1.1 創建一個Rails應用程序
    ?$ rails app_name
    ?可選項:
    ?-d, database=xxx 指定安裝一個數據庫(mysql oracle postgresql sqlite2 sqlite3 ), 默認情況下是數據庫
    ?-r, ruby-path= 指定Ruby的安裝路徑,如果沒有指定,scripts使用env去找Ruby
    ?-f, freeze (凍結)freezes Rails在vendor/rails目錄
    ?
    1.2 API Documentation
    ?$ gem_server
    ?啟動一個WEBrick服務器。這時候你可以通過Http://localhost:8808/ 打開瀏覽器去查看rails API文檔
    ?
    1.3 Rake
    ?rake db:fixtures:load
    ??# 載入fixtures到當前環境的數據庫
    ??# 載入指定的fixtures使用FIXTURES=x,y
    ?rake db:migrate
    ?# 遷移數據庫通過在db/migrate目錄下的腳本.可以指定版本號通過VERSION=x
    ?rake db:schema:dump
    ?# 創建一個db/schema.rb文件,通過AR能過夠支持任何數據庫去使用
    ?rake db:schema:load
    ?# 再入一個schema.rb文件進數據庫
    ?rake db:sessions:clear
    ?# 清空sessions表
    ?rake db:sessions:create
    ?# 用CGI::Session::ActiveRecordStore創建一個sessions表為用戶
    ?rake db:structure:dump
    ?# 導出數據庫結構為一個SQL文件
    ?rake db:test:clone
    ?# 重新創建一個測試數據庫從當前環境數據庫中
    ?rake db:test:clone_structure
    ?# 重新創建測試數據庫從開發模式數據庫
    ?rake db:test:prepare
    ?# 準備測試數據庫并在入schema
    ?rake db:test:purge
    ?# 清空測試數據庫
    ?rake doc:app
    ?# 創建HTML文件的API Documentation
    ?rake doc:clobber_app
    ?# 刪除Documentation
    ?rake doc:clobber_plugins
    ?# 刪除 plugin Documentation
    ?rake doc:clobber_rails
    ?# 刪除Documentation
    ?rake doc:plugins
    ?# 產生Documation為所有安裝的plugins
    ?rake doc:rails
    ?# 創建HTML文件的API Documentation
    ?rake doc:reapp
    ?# 強制重新創建HTML文件的API Documentation
    ?rake doc:rerails
    ?# 強制重新創建HTML文件的API Documentation
    ?rake log:clear
    ?# 清空目錄log/下的所有日志文件
    ?rake rails:freeze:edge
    ?# Lock this application to latest Edge Rails. Lock a specific revision with REVISION=X
    ?rake rails:freeze:gems
    ?# Lock this application to the current gems (by unpacking them into vendor/rails)
    ?rake rails:unfreeze
    ?# Unlock this application from freeze of gems or edge and return to a fluid use of system gems
    ?rake rails:update
    ?# Update both scripts and public/javascripts from Rails
    ?rake rails:update:javascripts
    ?# Update your javascripts from your current rails install
    ?rake rails:update:scripts
    ?# Add new scripts to the application script/ directory
    ?rake stats
    ?# Report code statistics (KLOCs, etc) from the application
    ?rake test
    ?# Test all units and functionals
    ?rake test:functionals
    ? # Run tests for functionalsdb:test:prepare
    ?rake test:integration
    ?# Run tests for integrationdb:test:prepare
    ?rake test:plugins
    ?# Run tests for pluginsenvironment
    ?rake test:recent
    ?# Run tests for recentdb:test:prepare
    ?rake test:uncommitted
    ?# Run tests for uncommitteddb:test:prepare
    ?rake test:units
    ?# Run tests for unitsdb:test:prepare
    ?rake tmp:cache:clear
    ?# 清空tmp/cache目錄下的所有文件
    ?rake tmp:clear
    ?# 清空session, cache, 和socket文件從tmp/目錄
    ?rake tmp:create
    ?# 為sessions, cache, and sockets創建tmp/目錄
    ?rake tmp:sessions:clear
    ?# 清空所有在tmp/sessions目錄下的文件
    ?rake tmp:sockets:clear
    ?# 清空所有在tmp/sessions 目錄下的ruby_sess.* 文件
    ?
    1.4 Scripts
    ?script/about
    ?# 輸出當前環境信息
    ?script/breakpointer
    ?# 啟動斷點server
    ?script/console
    ?#?啟動交換式的Rails控制臺
    ?script/destroy
    ?# 刪除通過generators創建的文件
    ?script/generate
    ?# -> generators
    ?script/plugin
    ?# -> Plugins
    ?script/runner
    ?# 執行一個任務在rails上下文中
    ?script/server
    ?# 啟動開發模式服務器http://localhost:3000
    ?//以下幾個不知道怎么去使用
    ?script/performance/profiler
    ?script/performance/benchmarker
    ?script/process/reaper
    ?script/process/spawner
    ?
    1.5 Generators
    ?ruby script/generate model ModelName
    ?ruby script/generate controller ListController show edit
    ?ruby script/generate scaffold ModelName ControllerName
    ?ruby script/generate migration AddNewTable
    ?ruby script/generate plugin PluginName
    ?ruby script/generate mailer Notification lost_password signup
    ?ruby script/generate web_service ServiceName api_one api_two
    ?ruby script/generate integration_test TestName
    ?ruby script/generate session_migration
    ?可選項:
    ?-p, --pretend Run but do not make any changes.
    ?-f, --force Overwrite files that already exist.
    ?-s, --skip Skip files that already exist.
    ?-q, --quiet Suppress normal output.
    ?-t, --backtrace Debugging: show backtrace on errors.
    ?-h, --help Show this help message.
    ?-c, --svn Modify files with subversion. (Note: svn must be in path)?
    ?
    1.6 Plugins
    ?script/plugin discover
    ?# discover plugin repositories
    ?script/plugin list
    ?# list all available plugins
    ?script/plugin install where
    ?# install the a€wherea€? plugin
    ?script/plugin install -x where
    ?# install where plugin as SVN external
    ?script/plugin install http://invisible.ch/projects/plugins/where
    ?script/plugin update
    ?# update installed plugins
    ?script/plugin source
    ?# add a source repository
    ?script/plugin unsource
    ?# removes a source repository
    ?script/plugin sources
    ?# lists source repositories
    posted on 2007-02-19 07:54 無衣 閱讀(226) 評論(0)  編輯  收藏
     
    主站蜘蛛池模板: 免费人成视频x8x8入口| 亚洲精品国产成人影院| 91网站免费观看| 日本免费一区二区三区最新vr| 亚洲性在线看高清h片| 久久亚洲sm情趣捆绑调教| 亚洲精品色在线网站| 麻豆精品不卡国产免费看| 情侣视频精品免费的国产| 亚洲精品无码久久久久秋霞| baoyu122.永久免费视频| 全免费A级毛片免费看网站| 国产精品亚洲综合一区| 亚洲狠狠ady亚洲精品大秀| gogo免费在线观看| 在线看片无码永久免费aⅴ| 亚洲va中文字幕| 五月婷婷综合免费| 久久精品国产亚洲网站| 在线观看免费亚洲| 热久久这里是精品6免费观看| 亚洲精品无码永久中文字幕| 国产精品亚洲一区二区三区在线观看 | 国产午夜免费高清久久影院| 久久精品7亚洲午夜a| 中文字幕亚洲情99在线| 久久久久久免费一区二区三区| 亚洲国产天堂久久综合网站| 日韩在线观看视频免费| 在线精品免费视频无码的| 亚洲色偷偷偷网站色偷一区| 成人浮力影院免费看| 小说区亚洲自拍另类| 综合亚洲伊人午夜网| 亚洲日韩在线观看免费视频| 亚洲AV无码久久| 成人毛片免费视频| 亚洲人成网站在线在线观看| 免费在线精品视频| 午夜精品免费在线观看| 亚洲欧洲国产精品你懂的|