Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy fails with nasty PGError if no blurbs have been added #38

Open
cwoodcox opened this issue Nov 12, 2012 · 0 comments
Open

Deploy fails with nasty PGError if no blurbs have been added #38

cwoodcox opened this issue Nov 12, 2012 · 0 comments

Comments

@cwoodcox
Copy link

I was setting up an install in a new app today, and I admittedly got the steps a little out of order, but it was a little weird to have to tail the logs on the copycopter server to figure it out...

Started POST "/api/v2/projects/[snip]/deploys" for 127.0.0.1 at 2012-11-12 18:34:10 +0000
Processing by Api::V2::DeploysController#create as */*
  Parameters: {"project_id"=>"[snip]"}
Completed 500 Internal Server Error in 5ms

ActiveRecord::StatementInvalid (PG::Error: ERROR:  syntax error at or near ")"
LINE 11:       AND localizations.id IN ();
                                        ^
:       UPDATE localizations
        SET published_version_id = latest_version.id,
        published_content = latest_version.content,
        updated_at = '2012-11-12 18:34:10.075543'
      FROM (
                SELECT DISTINCT ON (localization_id) localization_id, id, content
        FROM versions ORDER BY localization_id DESC, id DESC

        ) AS latest_version
      WHERE latest_version.localization_id = localizations.id
      AND localizations.id IN ();
):
  app/models/localization.rb:56:in `publish'
  app/models/project.rb:50:in `deploy!'
  app/controllers/api/v2/deploys_controller.rb:3:in `create'

Once I added a blurb to a view in the project and loaded the page, the deploy rake task worked fine, but a 500 error made me sad. I'll fix it a little later when I've got more time, but if anyone wants to take a stab at it, by all means! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant