Rails常用命令
rails new Project
rails g scaffold location uuid:string deviceid:string latitude:float longitude:float
rails g model location uuid:string deviceid:string latitude:float longitude:float
rails g migration create_locations
rails g controller locations
bundle install
bundle update
bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rake db:drop
bundle exec rake db:create RAILS_ENV=production
bundle exec rake db:migrate RAILS_ENV=production
bundle exec rake db:drop RAILS_ENV=production
bundle exec rake assets:precompile
bundle exec rake routes
bundle exec rake db:add_dianping_shops index_begin=0 index_end=500 RAILS_ENV=production
rails server
rails console
touch tmp/restart.txt
sudo service nginx restart
家教呢:www.jiajiaone.com