Created
April 27, 2021 02:42
-
-
Save anitagraham/418953092adafbb59b55b894c42fc1af to your computer and use it in GitHub Desktop.
Minimal config for setting up Refinerycms (April 2021)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| default: &default | |
| adapter: postgresql | |
| host: localhost | |
| username: <%= Rails.application.credentials[:database][:username] %> | |
| password: <%= Rails.application.credentials[:database][:password] %> | |
| database: <%= Rails.application.credentials[:database][:dbname] %>_<%= Rails.env %> | |
| pool: 5 | |
| development: | |
| <<: *default | |
| test: | |
| <<: *default | |
| production: &production | |
| database: <%= ENV['DATABASE_URL'] %> | |
| <<: *default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # At least these refinery gems | |
| gem 'refinerycms', git: 'https://github.com/refinery/refinerycms', branch: 'master' | |
| gem 'refinerycms-authentication-devise', git: 'https://github.com/refinery/refinerycms-authentication-devise', ref: 'master' | |
| gem 'refinerycms-wymeditor', git: 'https://github.com/parndt/refinerycms-wymeditor', branch: 'master' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I will try using these to build a new refinery app, and see what else I need to do. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Building a new refinerycms site April 2021
TL;DR
I have left out any errors that occured (and will occur) in this section. They are mentioned further down outside the magic TL;DR. Assume one occurred at least everytime you need to stop and edit a file.
Just to make things more confusing I am (for reasons) building my refinerycms site in a directory called ... site. No need to do the same (unless reasons).
Edit
config/application.rband addEdit
Gemfileand addrouting-filteris released.Note: at this point the steps that the install script would take need to be done manually.
and you should see a webserver start up (probably on port 3000, so you can take your browser to
http://localhost:3000and see the default Refinery front page.To login to refinery and make changes, navigate to
http://localhost:3000/refinery. Refinery will begin by creating an admin user for you, then taking you to the 'backend' page where you can edit the site's content.If you really want to see the ups and downs to get to the answer above... Note: here I am using postgresql, not mentioned in tldr.
bundle install failed as it couldn't find suitable gems for rails (3.2) or even bundler.
Second try
same results
Third try
Got a lot further, until it hit a Zeitwerk problem. Now to fix that, and also consider what else I might like to add.
NameError: wrong constant name Refinerycms-authentication-devise /private/var/www/purify/site/config/environment.rb:5:in `<main>'(p.s. purify because that is what a refinery does.)
The quick answer is to edit
config/application.rband addconfig.autoloader = :classicWhat to do next? How to pick up the Refinerycms install process mid-stream?
refinerycms site --skiplooked good until it addedgem 'refinerycms', '~> 2.1.0'to a Gemfile which already had refinery added.refinerycms site --updatealso tries to update the Gemfile.Look at the template that began this run from
https://www.refinerycms.com/t/edge.Aha! (I needed to edit my
database.ymland my rails credentials here, but that is because Ihave some not-the-default values I use. You don't need to do this ... yet)
Picking up where the template left off, I ran
which got a little further before running into a genuine problem with Rails 6.1, which we can fix.
I added the following to the Gemfile. Note: this fix is only required until Refinery incorporates it into its own requirements.
Trying out
rails srevealed just one more step:Webpacker was not installed. So after
rails webpacker:installI was able to bring the application up and see the default, unstyled application front page. (see image)