Basically I’ve created a system with categories, that belong to
tutorials, and these tutorials have positions.
I’ve only recently created to new position thing, and I’ve added this
to my edit form:
This works fine in production mode, and everything is as it should be.
However when I upload it to my actual site (so it goes to production
mode) it says an error has occured. And the production log gives out
this error:
ActionView::TemplateError (undefined method `position’ for #<Tutorial:
0xb752a384>) on line #21 of app/views/tutorials/edit.html.erb:
18:
Thanks for your help, I can’t belive I didn’t even know about
migrating in production mode (I remember I had the problem before, but
couldnt remember how I fixued it (must have been via this method)).
If anyone wants to know how: rake db:migrate RAILS_ENV=“production”
Thanks for your help, I can’t belive I didn’t even know about
migrating in production mode (I remember I had the problem before, but
couldnt remember how I fixued it (must have been via this method)).
If anyone wants to know how: rake db:migrate RAILS_ENV=“production”
Better yet, set up Capistrano, which automates this and most other
deployment tasks.