Rails 3: Model.all => NoMethodError: undefined method 'accept' for nil:NilClass

后端 未结 2 948
滥情空心
滥情空心 2021-01-18 21:41

I\'m trying to build a Rails app around a pre-existing MySQL database. I created the rails project, set up the database.yml file properly and created one model, User, to cor

2条回答
  •  清酒与你
    2021-01-18 22:22

    Just had the same issue. Narrowed it to being a MySQL related issue since it was happening only in staging environment (MySQL) and not in the developpment one (sqlite3). Fixed it by upgrading the mysql2 from version 0.2.7 to 0.3.11.

提交回复
热议问题