Coder Social home page Coder Social logo

Comments (16)

parndt avatar parndt commented on July 19, 2024

You'll need to tell us Refinery CMS version :)
It's likely that you just don't have the UserPlugin entry for it

User.all.each do |u|
  u.plugins.create(:name => 'refinerycms_blog', 
                   :position => (u.plugins.maximum(:position) || -1) +1)
end

That code may insert it for you (using console via heroku console)

from refinerycms-blog.

dsaronin avatar dsaronin commented on July 19, 2024

Sorry, I'm using the latest version of the gem (downloaded 2 da ago) refinerycms-0.9.8.5 running on Rails 3.0.1. Latest refinerycms-blog: 1.0.rc9.

The plugin info you suggested is in the init.rb of the blog gem ... I'm wondering why heroku Rails isn't seeing that and initing.

from refinerycms-blog.

parndt avatar parndt commented on July 19, 2024

the init.rb is only run on versions of Refinery < 0.9.8, otherwise it uses the logic in lib/refinerycms-blog.rb

Did running that code block in heroku console work? It's code from the database migration.

from refinerycms-blog.

dsaronin avatar dsaronin commented on July 19, 2024

i didn't try the code yet .. i was impatient yesterday, so I blew away the blog plugin and tried the other blog plugin in the engines list, but that plugin doesn't play well with the newer refinery and Rials 3.0, so I blew it away and tried going back to refinerycms-blog, but then refinery app itself didn't have a clue about the blog anywhere and kept bombing out with exceptions, so I blew away the DB on heroku, reset it, then tried rake db:migrate was but it failed (stopped liking 20091109012126_add_missing_indexes.rb saying: heroku rake db:migrate
rake aborted!
An error has occurred, this and all later migrations canceled:

PGError: ERROR: relation "pages" does not exist
: CREATE INDEX "index_pages_on_parent_id" ON "pages" ("parent_id")
)

So at this point, I'm going to destroy the app altogether from heroku and local machine. And redo the entire installation process, this time with blog/news/themes etc enabled in Gemfile, and hope that it picks up everything correctly!

All that being said, there was still an issue with how the blog is being displayed (all html was being displayed) when the blog is clicked on.

from refinerycms-blog.

parndt avatar parndt commented on July 19, 2024

You have to use:

heroku rake db:setup

before installing any engines

from refinerycms-blog.

dsaronin avatar dsaronin commented on July 19, 2024

I did that originally when I first installed the engines .. that set up the migrations. Those migrations were still there when I tried to reset heroku database. Do you mean it is needed everytime the DB is reset, as well?

from refinerycms-blog.

parndt avatar parndt commented on July 19, 2024

rake db:setup sets things up perfectly, you shouldn't need to run rake db:reset or other tasks

of course, rake db:migrate is what to use to migrate ;-)

from refinerycms-blog.

dsaronin avatar dsaronin commented on July 19, 2024

I didn't run rake db:reset, I did heroku db:reset to destroy the DB and start fresh .. so in that case, I should also run rake db:setup again?

from refinerycms-blog.

parndt avatar parndt commented on July 19, 2024

Ah - yes :-)

from refinerycms-blog.

dsaronin avatar dsaronin commented on July 19, 2024

ok .. thx for the help! I'll let you know how the total re-do goes

from refinerycms-blog.

dsaronin avatar dsaronin commented on July 19, 2024

Question: The engine plug in docs say to do rake db:migrate .. should I do that or do db:setup after installing plugins?

from refinerycms-blog.

parndt avatar parndt commented on July 19, 2024

rake db:setup is for initially setting up Refinery CMS

after that, always use rake db:migrate otherwise you'll wipe all your data

from refinerycms-blog.

dsaronin avatar dsaronin commented on July 19, 2024

it looks like refinerycms gem did that (rake db:setup) for me locally. will I still need to do that on heroku after I do my initial push?

from refinerycms-blog.

parndt avatar parndt commented on July 19, 2024

If you don't use heroku db:push then yes you will as it's a different database.

from refinerycms-blog.

dsaronin avatar dsaronin commented on July 19, 2024

OK, i have successfully re-installed refinery on heroku with blogs/news/themes, from scratch. Both blogs & news do come up and appear in both main site as well as admin side. I am able to create a blog. Blog still displays all the html formatting when the blog post is clicked. (Example:

This is how a sentence looks something ) I suspect that Rails sanitize is NOT being used, but the default html_escape that 3.0 presumes.

The strange thing is that this time, default starting pages for HOME, INQUIRY were not present. Any thoughts about why? or any easy way to create?

Is there a setting to turn off COMMENT MODERATION (so that all comments are accepted and displayed)?

Thanks for your help!

from refinerycms-blog.

dsaronin avatar dsaronin commented on July 19, 2024

everything is fine now; latest version display blog properly; thanks

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.