Rails 3 - how do I avoid database altogether?

前端 未结 2 1529
难免孤独
难免孤独 2020-12-02 06:37

I\'m trying to use rails 3 without any db backend, but it still insists on requiring \'sqlite3\' gem when I try to access a page, and throws an error no such file to l

2条回答
  •  天命终不由人
    2020-12-02 07:03

    Also, in Rails 3, remove any references to active_record in

    config/environments/development.rb

    config/environments/test.rb and

    config/environments/production.rb such as

    config.active_record.mass_assignment_sanitizer = :strict
    config.active_record.auto_explain_threshold_in_seconds = 0.5
    

    as well as removing require "rails/all" and adding the require lines in comment 21 (above).

    if you are not using a database (this works with Rails 3.1.1)

提交回复
热议问题