Reputation: 5644
I have just pushed a rails project to heroku, but I get the "We're sorry, but something went wrong."-error when I try to visit the web address. I did heroku run rake db:migrate
just after I uploaded the project. Does someone know what the issue might be?
2013-07-07T03:18:40.493412+00:00 heroku[web.1]: State changed from starting to up
2013-07-07T03:19:30.121757+00:00 app[web.1]: => Booting WEBrick
2013-07-07T03:19:30.121757+00:00 app[web.1]: => Rails 3.2.13 application starting in production on http://0.0.0.0:7276
2013-07-07T03:19:30.121757+00:00 app[web.1]: => Call with -d to detach
2013-07-07T03:19:30.121757+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-07-07T03:19:30.121757+00:00 app[web.1]: Started GET "/" for 216.15.124.94 at 2013-07-07 03:19:30 +0000
2013-07-07T03:19:30.298842+00:00 app[web.1]: Processing by PagesController#lelist as HTML
2013-07-07T03:19:30.683128+00:00 app[web.1]: Completed 500 Internal Server Error in 384ms
2013-07-07T03:19:30.680391+00:00 app[web.1]: Rendered pages/_singlePost.html.erb (39.1ms)
2013-07-07T03:19:30.687518+00:00 app[web.1]: 1: <% @posts.each do |p| %>
2013-07-07T03:19:30.682956+00:00 app[web.1]: Rendered pages/lelist.html.erb within layouts/application (122.9ms)
2013-07-07T03:19:30.687518+00:00 app[web.1]: 3: <div class="span6 offset3">
2013-07-07T03:19:30.687741+00:00 app[web.1]: app/views/pages/_singlePost.html.erb:1:in `_app_views_pages__single_ost_html_erb___4229188597617574554_47615640'
2013-07-07T03:19:30.687741+00:00 app[web.1]:
2013-07-07T03:19:30.687518+00:00 app[web.1]: 4: <div class="thumbnail">
2013-07-07T03:19:30.687741+00:00 app[web.1]: app/views/pages/lelist.html.erb:22:in `_app_views_pages_lelist_html_erb___4165065758361537325_47142940'
2013-07-07T03:19:30.687518+00:00 app[web.1]: LINE 1: SELECT "posts".* FROM "posts" WHERE (DATETIME(created_at) ...
2013-07-07T03:19:30.687518+00:00 app[web.1]: : SELECT "posts".* FROM "posts" WHERE (DATETIME(created_at) <= DATETIME('2013-07-07 03:19:30.364173')) ORDER BY created_at DESC LIMIT 10 OFFSET 0):
2013-07-07T03:19:30.687518+00:00 app[web.1]: HINT: No function matches the given name and argument types. You might need to add explicit type casts.
2013-07-07T03:19:30.687741+00:00 app[web.1]:
2013-07-07T03:19:30.687518+00:00 app[web.1]:
2013-07-07T03:19:30.687518+00:00 app[web.1]: ActionView::Template::Error (PGError: ERROR: function datetime(timestamp without time zone) does not exist
2013-07-07T03:19:30.687518+00:00 app[web.1]: 2: <div class="row">
A little further down in the log I get another error:
2013-07-07T03:35:54.804738+00:00 app[web.1]: ActionView::Template::Error (PGError: ERROR: function datetime(timestamp without time zone) does not exist
2013-07-07T03:35:54.804738+00:00 app[web.1]: LINE 1: SELECT "posts".* FROM "posts" WHERE (DATETIME(created_at) ...
2013-07-07T03:35:54.804738+00:00 app[web.1]: ^
2013-07-07T03:35:54.804738+00:00 app[web.1]: HINT: No function matches the given name and argument types. You might need to add explicit type casts.
2013-07-07T03:35:54.804738+00:00 app[web.1]: : SELECT "posts".* FROM "posts" WHERE (DATETIME(created_at) <= DATETIME('2013-07-07 03:35:54.572183')) ORDER BY created_at DESC LIMIT 10 OFFSET 0):
2013-07-07T03:35:54.804738+00:00 app[web.1]: 1: <% @posts.each do |p| %>
2013-07-07T03:35:54.804738+00:00 app[web.1]: 4: <div class="thumbnail">
2013-07-07T03:35:54.804738+00:00 app[web.1]: 2: <div class="row">
2013-07-07T03:35:54.804738+00:00 app[web.1]: 3: <div class="span6 offset3">
2013-07-07T03:35:54.804934+00:00 app[web.1]: app/views/pages/_singlePost.html.erb:1:in `_app_views_pages__single_ost_html_erb___4229188597617574554_47615640'
2013-07-07T03:35:54.804934+00:00 app[web.1]: app/views/pages/lelist.html.erb:22:in `_app_views_pages_lelist_html_erb___4165065758361537325_47142940'
Upvotes: 0
Views: 101
Reputation: 28483
Heroku uses postgresql for your database. DATETIME is not a function postgres supports. You should set up a postgresql database of the same version in your development environment. What OS are you on? If windows, I wrote any answer for that (some of it is applicable even if you're running linux).
Upvotes: 2