进行rails的环境设置的时候,需要进行设置默认值,不然成员第一次运行就会出现报错。

类似这样:

因此需要进行初始化的环境变量的设置
class CreateSettings < ActiveRecord::Migration
  def change
    create_table :settings do |t|
      t.string :name
      t.string :value
      t.string :comment
      t.string :default
      t.timestamps null: false
    end
    Setting.create name: 'ENABLE_MOBILE_EMAIL', value: 'no', default: 'no', comment:  ''  
  end
end