建立一個典型的Ruby On Rails網站(一)

來源:互聯網
上載者:User

寫在前面:

第一次,寫連載啊,希望能對自己和各位看官有點協助,多瞭解一點RubyOnRails開發上的情況吧。能夠有點協助,這就是堅持的理由。^_^

生命百科全書:www.eol.org

網站是基於RoR的,內容是做互動的生命百科博物館,本文主要介紹,如果通過該網站提供的代碼,建立起RoR的網站,並且學習,該網站中使用到的一些,RoR最普通的技術。

資源地址如下,匿名svn下載。

svn://repository.eol.org/eol/trunk/

配置前提

安裝ruby

rails和mysql最流行的要求。

其次,

安裝gems包

列表如下:

1. ZenTest

2. ruby-debug

3. piston

4. hpricot

實際上這些包都整合到vendor下的gems下了。這是一個相當閃光的辦法。對待gem像對待plugin一樣,不gems放到vendor gems下

安裝如下:

Ruby代碼

  rake gems         # This could give you some errors...  rake gems:build   # if there are gems that aren't installed or you got that big error...  rake gems:install # if there were gems that are STILL missing...

設定資料庫

拷貝config/database.yml

根據需要把demo development 和master_database資料庫配置正確

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.