我看了这篇关于rake命令的文章,但是不知道RAILS_ENV在哪里。在某个特定的文件里吗?db:create Creates the database for the current RAILS_ENV environment.If RAILS_ENV is not specified it defaults to the development and test databases.
为了避免,我得到了一个在提交之后需要运行的sidekiq作业,但只在某些情况下运行,而不是全部运行。例如,下面的after_commit总是会触发,但是内部的代码只有在标志为true (以前在验证方法中设置)时才会执行。end代码有点难看。我更希望能够像这样以某种方式将回调内联起来:
class User < ActiveReco