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.rb
and addEdit
Gemfile
and addrouting-filter
is 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:3000
and 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.rb
and addconfig.autoloader = :classic
What to do next? How to pick up the Refinerycms install process mid-stream?
refinerycms site --skip
looked good until it addedgem 'refinerycms', '~> 2.1.0'
to a Gemfile which already had refinery added.refinerycms site --update
also 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.yml
and 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 s
revealed just one more step:Webpacker was not installed. So after
rails webpacker:install
I was able to bring the application up and see the default, unstyled application front page. (see image)