How to configure Ruby on Rails with no database?

前端 未结 6 1924
情歌与酒
情歌与酒 2020-11-30 19:27

It would be convenient to use Ruby on Rails for a small website project that has no current need for a database. I know I could create an empty database in MySQL and go fro

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-30 20:07

    For Rails 3 and Rails 4:

    Use -O(Capital 'O') or --skip-activerecord option to generate an application without a database.

    rails new myApp -O

    or

    rails new myApp --skip-activerecord

    This Answer is reshared from here


    For Rails 5:

    Use --skip-active-record option to generate an application without a database

    Notice the extra hyphen '-' as opposed to previous Rails versions.

    rails new myApp --skip-active-record

提交回复
热议问题