I’m learning rails. I on chapter 7 of Michael Hartl’s rails tutorial. I am trying to make a signup page where users can create an account. I can create users without problems when I run my app from a local environment (localhost:3000), however when I push the changes up to Heroku, pressing the sign-up button results in the error “We’re sorry but something went wrong”.
Checking the heroku logs I find:
Started GET "/signup" for [an ip address...] at 2012-08-27 21:36:15 +0000
Processing by UsersController#new as HTML
ActionView::Template::Error (Missing partial /shared/error_messages with
{:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder]}. Searched in:
* "/app/app/views"
Rendered users/new.html.erb within layouts/application (38.9ms)
6: <%= form_for(@user) do |f| %>
Completed 500 Internal Server Error in 137ms
5: <div class="span6 offset3">
):
4: <div class="row">
app/views/users/new.html.erb:6:in
`_app_views_users_new_html_erb___3412900076253353202_33302880'
7: <%= render '/shared/error_messages' %>
8: <%= f.label :name %>
app/views/users/new.html.erb:7:in `block in
_app_views_users_new_html_erb___3412900076253353202_33302880'
9: <%= f.text_field :name %>
Now I’ve run:
$ heroku run rake db:migrate
and I’ve included 'pg', '0.12.2' in my gemfile.
I’ve also rolled back the heroku db using:
$ heroku pg:reset HEROKU_POSTGRESQL_WHITE
and then re-migrated it
$ heroku run rake db:migrate
to no avail. Any ideas? It is strange because everything other aspect of the webpage works, and the whole thing works in my local environment. Thanks.
You are missing a partial:
Check if it has been added to git.