I create an model class in rails and test both ok in local development and production environment. However, I deployed the rails app to AWS and find super strange problem. I can not use my model anymore.
For example,
Loading production environment (Rails 4.1.6)
Mgmt_Server :001 > defined?(Game)
=> "constant"
Mgmt_Server :002 > Game.create
NoMethodError: undefined method `[]' for nil:NilClass ... etc
in development of AWS
Loading development environment (Rails 4.1.6)
Mgmt_Server :004 > Game.create!
(0.1ms) BEGIN
SQL (0.2ms) INSERT INTO `games` (`created_at`, `updated_at`) VALUES ('2015-05-21 08:41:16', '2015-05-21 08:41:16')
(2.0ms) COMMIT
=> #
Totally no idea about the root cause... Im pretty sure no problem in db site beacuase I used same db for testing.
Thansk
Aucun commentaire:
Enregistrer un commentaire