1/08/2007

如何用 svn 開發 Ruby on Rails

Subversion 是市面上最常用的 version controller 的系統,這篇主要是介紹如何用 Subverison 開發 Ruby on Rails 程式。其實開發 Ruby on Rails 程式就跟開發其他的程式一樣,你依舊可以用任何你以前用過的 svn 技巧,但是 Ruby on Rails 也跟 Subverison 作了相當好的整合,不用實在可惜。

創立一個新的 Project
請在一個 svn 的目錄下面,創立一個 rails project ,叫 abc 好了
rails abc
進入 abc,將所有程式加入 version controller
cd abc
svn add . --force
將新增的 Project 送到 svn 資料庫
svn ci -m "Starting a Rails Project"
log 跟 tmp 資料都是放些暫存的檔案,不需要進 svn 資料庫,將 log 跟 tmp 排除 svn 資料庫
svn remove log/*
svn remove tmp/*
svn propset svn:ignore "*.*" log/
svn propset svn:ignore "*.*" tmp/
svn ci - m "removing log and tmp files”
Generator 時順便加入 svn 資料庫
ruby script/generate 任何東西時,因為一次會產生很多程式碼,記得加入 -c 或是 --svn 這個選項,順便加入 svn 資料庫。

Destroy 時順便移除 svn 資料庫
ruby script/destroy 任何東西時,因為一次得砍掉很多程式碼,記得加入 -c 或是 --svn 這個選項,順便將要移除的東西移出 svn 資料庫。



1 則留言:

匿名 提到...

Good morning Website owner! Only want to speak that we much like your internet business far more.
[url=http://www.businesscreditcardv.com]business credit card[/url] [url=http://www.businesscreditcardv.com/small-business-credit-cards]small business credit cards[/url] business credit card personal guarantee [url=http://www.calendartemplatev.com]calendar template[/url] [url=http://www.calendartemplatev.com/monthly-calendar-template]monthly calendar template[/url] calendar template for december 2010 [url=http://www.carbatteryv.com]car battery[/url] [url=http://www.carbatteryv.com/car-battery-sizes]car battery sizes[/url] car battery 6 or 12 volt [url=http://www.digitalphotoframev.com]digital photo frame[/url] [url=http://www.digitalphotoframev.com/digital-photo-frame-deals]digital photo frame deals[/url] digital photo frame wireless [url=http://www.fitnessgymv.com]fitness gym[/url] [url=http://www.fitnessgymv.com/health-and-fitness-gym]health and fitness gym[/url] eco fitness gym charleston [url=http://www.greenhomev.com/]green home[/url] [url=http://www.greenhomev.com/green-home-products]green home products[/url] total fitness gym 1700 [url=http://www.hairremovalv.com]hair removal[/url] [url=http://www.hairremovalv.com/body-hair-removal]body hair removal[/url] hair removal 2009 [url=http://www.homemadepizzav.com]homemade pizza[/url] [url=http://www.homemadepizzav.com/great-tasting-homemade-pizza-recipe]great tasting homemade pizza recipe[/url] homemade pizza dc [url=http://www.horsetrailersv.com]horse trailers[/url] [url=http://www.horsetrailersv.com/sundowner-horse-trailers]sundowner horse trailers[/url] horse trailers 6 horse [url=http://www.hybridbikev.com]hybrid bike[/url] [url=http://www.hybridbikev.com/hybrid-bike-reviews]hybrid bike reviews[/url] hybrid bike 26 [url=http://www.itunesv.org]itunes[/url] [url=http://www.itunesv.org/itunes-help]itunes help[/url] itunes login [url=http://www.kneepainv.com]knee pain[/url] [url=http://www.kneepainv.com/back-of-knee-pain]back of knee pain[/url] knee pain years after knee replacement [url=http://www.lavenderplantsv.com]lavender plants[/url] [url=http://www.lavenderplantsv.com/buy-lavender-plants-online]buy lavender plants online[/url] lavender plants for lawns [url=http://www.minimacv.com]mini mac[/url] [url=http://www.minimacv.com/refurbished-mini-mac]refurbished mini mac[/url] mini mag 40 22lr [url=http://www.moneytreev.com]money treev[/url] [url=http://www.moneytreev.com/money-tree-gift]money tree gift[/url] money tree growth [url=http://www.organicvegetablev.com]organic vegetable[/url] [url=http://www.organicvegetablev.com/organic-vegetable-online]organic vegetable online[/url] organic vegetable restaurant [url=http://www.paintballgunv.com]paintball gun[/url] [url=http://www.paintballgunv.com/paintball-guns-markers]paintball guns markers[/url] paintball gun dimensions [url=http://www.pontoonboatsv.com]pontoon boats[/url] [url=http://www.pontoonboatsv.com/bentley-pontoon-boats]bentley pontoon boats[/url] pontoon boats quakertown [url=http://www.projectmanagementv.com]project management[/url] [url=http://www.projectmanagementv.com/project-management-skills]project management skills[/url] project management qatar [url=http://www.ps3gamesv.com]ps3 games[/url] [url=http://www.ps3gamesv.com/new-ps3-games]new ps3 games[/url] ps3 games on hard drive [url=http://www.thyroidproblemv.com]thyroid problem[/url] [url=http://www.thyroidproblemv.com/thyroid-problems-in-men]thyroid problems in men[/url] thyroid problems remedies [url=http://www.turnkeywebsitev.com]turnkey website[/url] [url=http://www.turnkeywebsitev.com/best-turnkey-websites]best turnkey websites[/url] turnkey website scams [url=http://www.vitamindv.com]vitamin d[/url] [url=http://www.vitamindv.com/benefits-of-vitamin-d]benefits of vitamin d[/url] vitamin d resistant rickets