RAILS の変更点   

  • 追加された行はこの色です。
  • 削除された行はこの色です。
  • RAILS へ行く。

- Ruby on Rails 4.0 での一連の流れ

* 新規プロジェクト作成(with aptana) [#dfcf012b]
新規railsプロジェクト作成~
コンソールに移動
 rm -rf *
 rails new ./ -d postgresql
 cp -rfp bin script
 createuser -U postgres -d 【プロジェクト名】
 createdb -U postgres -O 【プロジェクト名】 -E UTF-8 【プロジェクト名】_test
 createdb -U postgres -O 【プロジェクト名】 -E UTF-8 【プロジェクト名】_production
 createdb -U postgres -O 【プロジェクト名】 -E UTF-8 【プロジェクト名】_development

config/boot.rb
 begin
    File.delete(File.expand_path('../../tmp/pids/server.pid',  __FILE__))
 rescue
    # Do nothing
 end

 サーバービューから起動


* [#ad362c16]

CRUD 付きで作成する場合
 rails generate scaffold jpop artist:string song:string ranking:integer
 rake db:migrate

よくミスるのでその際は一度消す
 rails destroy scaffold jpop
 rake db:drop

server 起動
 rails server

access (url に s を付ける)
 http://192.168.0.111:3000/jpops