Fedora ruby工程更方便的安裝包
想知道到Fedora ruby工程系統(tǒng)的真相么,想知道Fedora ruby工程系統(tǒng)中藏有的內(nèi)在奧義么,只有我來給大家全面講解介紹Fedora ruby工程系統(tǒng)***個(gè)工程建立rails工程rails --Fedora ruby工程=path 工程鎖在的path修改environment里的database.yml然后做例子重啟服務(wù)器Fedora ruby工程 script\server關(guān)閉control c訪問地址http://localhost:3000/chinese/list
- ruby script\generate model paper修改db\migrate\新的rb文件,里邊加:t.column :name,:string
- rake db:migrate
- ruby script\generate controller paper
- ruby script\generate scaffold paper paper
fc6更方便的安裝包下一個(gè)yumexsudo yum install yumex在yumex可以直接選一個(gè)安裝用yum的話就要輸命令字體問題操作系統(tǒng)語言選擇了english,中文就變成了亂碼。
需要安裝字體* 字體安裝將Microsoft Windows(windows\fonts\)的相應(yīng)TrueType拷貝到Fedora ruby工程相應(yīng)目錄。我是放在/usr/share/fonts/windows目錄下。然后以root執(zhí)行下面的命令
- cd /usr/share/fonts/windows
- ttmkfdir .
- cp fonts.scale fonts.dir
- chkfontpath --add /usr/share/fonts/windows
以下是我安裝的字體文件
- (Arial) - arial.ttf arialbd.ttf arialbi.ttf ariali.ttf
- (Tahoma) - tahoma.ttf tahomabd.ttf
- (Verdana) - verdana.ttf verdanab.ttf verdanai.ttf verdanaz.ttf
- (GB) - simsun.ttc
- (BIG5) - mingliu.ttc
裝了gb和big5后,網(wǎng)頁和openoffice里的中文就沒問題了。開發(fā)oracle應(yīng)用需安裝OCI從http://Fedora ruby工程forge.org/frs/?group_id=256&release_id=12694上下載然后cmd中運(yùn)行 Fedora ruby工程 ruby-oci8-1.0.0-rc3-mswin32.rb即安裝成功,就可以rake db:migrate了.
- http://www.railsapi.org/activerecord-base-set_primary_key
- set_primary_key
- Description
- set_primary_key(value = nil, &block)
- Sets the name of the primary key column to use to the given value, or (if the value is nil or false) to the value returned by the given block.
- Examples: add
- Suggest an example
- Examples currently must be approved.
- This means that when you submit the example, it will not show up on this page until approved (generally 24 hours)
- Enclose ruby in <code> tags to get it syntax highlighted.
- Description
- or Cancel
- Example:
- class Project < ActiveRecord::Base
- set_primary_key "sysid"
- end
- User Contributed Notes add
- Add Comment
- Name
- Title
- Body
- or Cancel
- No comments
【編輯推薦】