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

auto_html is breaking rails migrations #71

Closed
pswenson opened this issue May 8, 2013 · 6 comments
Closed

auto_html is breaking rails migrations #71

pswenson opened this issue May 8, 2013 · 6 comments

Comments

@pswenson
Copy link

pswenson commented May 8, 2013

this code in my posts model

 auto_html_for :body do
    strip_tags
    html_escape
    image
    youtube(:width => 600, :height => 375)
    vimeo(:width => 600, :height => 375)
    link :target => "_blank", :rel => "nofollow"
    simple_format
  end

is causing this error when I run rails migrations:

rake aborted!
PG::Error: ERROR:  relation "posts" does not exist
LINE 4:              WHERE a.attrelid = '"posts"'::regclass
                                        ^
:             SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
              FROM pg_attribute a LEFT JOIN pg_attrdef d
                ON a.attrelid = d.adrelid AND a.attnum = d.adnum
             WHERE a.attrelid = '"posts"'::regclass
               AND a.attnum > 0 AND NOT a.attisdropped
             ORDER BY a.attnum

This looks similar to another issue that was supposed to be fixed in 1.6.0. I am running 1.6.0 though.... #42

thoughts?

@vsername
Copy link

vsername commented Jun 9, 2013

Nice post at http://stackoverflow.com/questions/15558781/auto-html-breaking-rails-migrations. I hope we find a solution soon.

@brettfishman
Copy link
Contributor

This commit (f75a052), supposedly included in the last released version 1.6.0, fixed this issue for me when testing locally. But these lines are nowhere to be found in my local auto_html 1.6.0 gem.

@brettfishman
Copy link
Contributor

Not 100% sure, but it looks like the 1.6.0 changes didn't make it in to the latest 1.6.0 gem. Maybe @dejan can create 1.6.1 to include all the changes that were supposed to be in 1.6.0??

Thanks.

@thatbettina
Copy link

Using master fixed this for us; please release 1.6.1. :)

@longlostnick
Copy link

Can this be closed since 1.6.1 is now released?

@dejan
Copy link
Owner

dejan commented Jan 7, 2014

Yes, thank you.

@dejan dejan closed this as completed Jan 7, 2014
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

6 participants