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

Rails常用命令的更多相关文章

  1. rails常用命令示例

    数据迁移命令 1.一下命令执行后会在db\migrate下产生同名数据迁移文件(文件内容可自行修改,基本语法见“数据迁移文件”部分) 创建model:rails generate model user ...

  2. rails常用命令备忘

    rails new xxx 创建一个新rails项目 rails generate scaffold xxx 创建表模型,视图,控制器和迁移的"脚手架" rake db:migra ...

  3. Linux 常用命令(持续补充)

    常用命令: command &:将进程放在后台执行 ctrl + z:暂停当前进程 并放入后台 jobs:查看当前后台任务 bg( %id):将任务转为后台执行 fg( %id):将任务调回前 ...

  4. LVM基本介绍与常用命令

    一.LVM介绍LVM是 Logical Volume Manager(逻辑卷管理)的简写,它是Linux环境下对磁盘分区进行管理的一种机制LVM - 优点:LVM通常用于装备大量磁盘的系统,但它同样适 ...

  5. Linux学习笔记(一):常用命令

    经过统计Linux中能够识别的命令超过3000种,当然常用的命令就远远没有这么多了,按照我的习惯,我把已经学过的Linux常用命令做了以下几个方面的分割: 1.文件处理命令 2.文件搜索命令 3.帮助 ...

  6. git常用命令(持续更新中)

    git常用命令(持续更新中) 本地仓库操作git int                                 初始化本地仓库git add .                       ...

  7. 【原】npm 常用命令详解

    今年上半年在学习gulp的使用,对npm的掌握是必不可少的,经常到npm官网查询文档让我感到不爽,还不如整理了一些常用的命令到自己博客上,于是根据自己的理解简单翻译过来,终于有点输出,想学习npm这块 ...

  8. npm常用命令

    npm常用命令 环境:win7 npm 是什么 NPM(node package manager),通常称为node包管理器.顾名思义,它的主要功能就是管理node包,包括:安装.卸载.更新.查看.搜 ...

  9. Git 常用命令

    一.初始環境配置 git config --global user.name "John Doe"git config --global user.email johndoe@ex ...

随机推荐

  1. 十八、mysql 内存优化 之 myisam

    .key_buffer 索引块大小 set global hot_cache.key_buffer_size = ; //设置大小 show variables like 'key_buffer_si ...

  2. Oracle bug 使用max或min函数into到一个char类型报字符缓冲区太小的错误

    这个BUG出现会报错如下: selectto_char(max(RENEWAL_DATE)) intoM_YEAR_MONTH fromt_renewal_schedule; ORA-06502: P ...

  3. 【iOS】init,loadView,viewDidLoad加载关系

    一.loadView 永远不要主动调用这个函数.view controller会在view的property被请求并且当前view值为nil时调用这个函数.如果你手动创建view,你应该重载这个函数. ...

  4. EXTJS4.2 控件之Grid getRowClass 添加行背景色

    css 样式: /*交流管理系统 开始*/ tr.x-grid-record-blue .x-grid-td { background: #87CEFF; }/*grid 行颜色*/ tr.x-gri ...

  5. Lua基础之table详解

    概要:1.table特性:2.table的构造:3.table常用函数:4.table遍历:5.table面向对象 原文地址:http://blog.csdn.net/dingkun520wy/art ...

  6. 如何把由js生成的内容水平居中?

    一.问题来源 如右侧的微博关注组件,直接用div的align居中没效果,我就开始百度了.即在<div> <script>.....</script>  </d ...

  7. mysql可以运行在不同sql mode模式下面,sql mode模式定义了mysql应该支持的sql语法,数据校验等

    查看默认的sql mode模式:select @@sql_mode;我的数据库是:STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUT ...

  8. spoj 297

    就是对距离进行二分找最大值 .... #include <cstring> #include <cstdio> #include <algorithm> #incl ...

  9. 单链表反转的递归实现(Reversing a Linked List in Java, recursively)

    转自Reversing a Linked List in Java, recursively There's code in one reply that spells it out, but you ...

  10. 深入理解c++中char*与wchar_t*与string以及wstring之间的相互转换

    本篇文章是对c++中的char*与wchar_t*与string以及wstring之间的相互转换进行了详细的分析介绍,需要的朋友参考下-复制代码 代码如下:    #ifndef USE_H_     ...