Coder Social home page Coder Social logo

Comments (12)

n5ken avatar n5ken commented on July 19, 2024

Test Environment: Ubuntu 10.04.1
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]

from refinerycms-blog.

joemsak avatar joemsak commented on July 19, 2024

If you generated blog before upgrading to 0997 this would be due to mis-ordered migration files. I'm actually dealing with this /right now/ on a client project. Will post findings asap

from refinerycms-blog.

joemsak avatar joemsak commented on July 19, 2024

I re-named my migration file timestamps so that this migration from the 0997 upgrade:

https://github.com/resolve/refinerycms/blob/master/db/migrate/20110307025652_translate_custom_title_on_pages.rb

ordered itself before my engine migration files.

Then, in development I was able to just rake db:drop, create & setup.

But on production, I ran this in console to fix "schema_migrations" without dropping the db:

ActiveRecord::Base.connection.execute("TRUNCATE TABLE schema_migrations")
Dir.open('db/migrate').each { |fname| i = fname.split('_').first.to_i; next if i == 0; ActiveRecord::Base.connection.execute("INSERT INTO schema_migrations (version) VALUES(#{i})") };nil

from refinerycms-blog.

n5ken avatar n5ken commented on July 19, 2024

Actually, I encountered this issue in a fresh install, tested with RefineryCMS 0.9.9.8, and here is my test steps:

1. refinerycms refinerycms998 -d mysql -u root -p root
2. uncomment the "# gem 'refinerycms-blog',         '~> 1.1'" in Gemfile
3. rails g refinerycms_blog 
4. rake db:migrate RAILS_ENV=production

the development environment is okay

from refinerycms-blog.

joemsak avatar joemsak commented on July 19, 2024

I just did this:

  • $ gem update refinerycms
  • $ refinerycms testtime
  • $ cd testtime
  • --- Edit gemfile (uncomment blog) ---
  • $ bundle install
  • $ rails g refinerycms_blog
  • $ rake db:migrate

It worked fine, no error. I was also on:
ruby 1.9.2dev (2010-06-18 revision 28360) [x86_64-darwin10.4.0]

from refinerycms-blog.

n5ken avatar n5ken commented on July 19, 2024

yes, "rake db:migrate" in development environment is okay, but error with production, you can try the following command to reproduce:
rake db:migrate RAILS_ENV=production

from refinerycms-blog.

joemsak avatar joemsak commented on July 19, 2024

I cannot reproduce this error. Check that the blog migration happens after the 'translate custom title' one.

from refinerycms-blog.

n5ken avatar n5ken commented on July 19, 2024

seems this have been fixed in RefineryCMS 9.9.12, so close this issue

from refinerycms-blog.

refriedchicken avatar refriedchicken commented on July 19, 2024

I am experiencing this in production (not development) on 9.9.20

from refinerycms-blog.

n5ken avatar n5ken commented on July 19, 2024

As far as i know, it may be an issue of the refinery, not this plugin, anyway, i will try it on 9.9.20

from refinerycms-blog.

refriedchicken avatar refriedchicken commented on July 19, 2024

Yes, I think you are right. When I stop the seeds file from running in the migrations and then run the seeds files manually have all migrations have been run it works fine.

from refinerycms-blog.

parndt avatar parndt commented on July 19, 2024

Add this to the top of your blog seeds:

Page.reset_column_information

from refinerycms-blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.