报错汇总

  • 正式环境提示no defined method status ,发现job表里没有status字段

执行RAILS_ENV="production" rake db:migrate解决

  • undefined method 'map' for nil:NilClass
  • 正式环境fa图标不显示,测试环境好使

把 sudo /etc/init.d/nginx restart 写成了 sudo /etc/init.d/nginx start 没有更新正式环境

  • Undefined method `stringify_keys'

If you're using the block form oflink_to,you can't have text content (the block is your text content). You'd need to do this:
<%= link_to project_step_path(@project, @project.steps.count-1), :class => "btn btn-small" do %> Back<% end %>

  • 测试环境可以注册,正式环境不能注册

查看production.log 提示Key (email)=() already exists已经存在,但在user没有限制其为唯一,而且测试好用
试着改变email属性,将 default '' 改为 default null,还是不行

rails g migration change_email_on_users
def change
  change_column :users, :email, :string, :default => 'NULL'
end
rake db:migrate

将 email设为不验证唯一性validates :email, uniqueness:false,但在观察日志时看到还是检查了email的唯一性(devise验证的);最后将user.rb中的devise :validates去掉,解决,不验证email的唯一性了

你可能感兴趣的:(报错汇总)