Skip to content

Instantly share code, notes, and snippets.

@shellfly
Created October 5, 2014 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shellfly/c6cc78ebc5b0fb812d41 to your computer and use it in GitHub Desktop.
Save shellfly/c6cc78ebc5b0fb812d41 to your computer and use it in GitHub Desktop.
rails

生成项目

rails new project_name

修改Gemfile source https://ruby.taobao.org

#安装Gems bundle install

生成schema

rails g model Book title author rails g model Comment book:references title:index content:text

#建立数据库表 rake db:migrate

rails server

rails s

run console

rails c

rails dbconsole

rails db

**Production bundle install --without development test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment