Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Joe
@joebutler2
Though I have refinery using the default route (which is "/" according to the comments), and when I configure the dragonfly host to there is fails.
Joe
@joebutler2
It's worth mentioning that since I'm using Rails 6, that I had to follow the guide for using refinery as an engine https://www.refinerycms.com/guides/with-an-existing-rails-app
Michael ChanHyuk Lee
@mepiphany
hi there!
I have a quick question for anybody who can help me! I can't seem to change the inquiry default URL. Is there a way for me to change the @localhost to @mywebsite.com?
if not if I want to override the mailers/inquiry.rb how can I do this? I don't see an override option for a mailer. thank you
Joe
@joebutler2
Has anyone used S3 signed URLs or signed cookies? My client's content is private, and we need to ensure someone can't share the URLs to the files stored on S3.
Joe
@joebutler2
Continuing from yesterday, I've updated the ACP and ACLs on S3 and that is looking promising. All that is necessary now is to have Refinery::Dragonfly require the users to be authenticated before serving any Resources.
Inside of the Refinery::Dragonfly configuration block, it looks like you have to pass in a block into the before_serve attribute. But that ends up raising an error. I'll keep pushing forward on this but if anyone has any ideas, or sees that I'm missing something simple let me know.
Joe
@joebutler2
Fixes the issue described above
Joe
@joebutler2
Hey folks, I noticed that for any links to S3 items contain a SHA. When you redeploy the app, all of the links then need a new SHA, otherwise visiting that item returns an error saying "you have the incorrect SHA".
So how are you supposed to have links to S3 items when the link (static) is stored in the database?
Kirk Dawson
@Captainkirkdawson
The following code line refinerycms-i18n (4.0.2) lib/refinery/i18n/engine.rb:30:in find_or_set_locale is frequently generating undefined method to_s= for :en:Symbol. Any suggestions?
Anita Graham
@anitagraham
@joebutler2 The SHA is not related directly to S3, but to any items which are being processed by Dragonfly - generally image and file resources. If I recall correctly, the SHA changes if you change the dragonfly-secret config item.
Anita Graham
@anitagraham
@joebutler2 There was a problem wayback in 2015 (markevans/dragonfly#387) different implementations of json gave a different SHA for files with non-ascii characters in the filename.
jussihirvi
@jussihirvi
Any hint on how I could get translations of db fields working in Refinerycms (4.0.3) backend for my extension? In my model I have mobility set on a couple of fields with :columnbackend. It seems that the Refinerycms backend always shows the field values based on i18n default_frontend_locale, which in my case is Finnish. The Refinery backend UI also is always displayed in default_frontend_locale, which may be related to my question. But the Pages module shows page contents (in Refinerycms backend) in BOTH of my i18n locales (set in i18n initializer with config.locales).
jussihirvi
@jussihirvi
Hm, changing i18n.config.current_localein the initializer file changes both the backend UI language and the localized field contents in the backend. I think I can get a solution based on this, but I am still interested to know the recommended solution/best practice.
michaelgmanning
@michaelgmanning

I am trying to install RefineryCMS to become familiar with it. I have no knowledge or interest in ruby or rails, I just want to run the application. I am using Linux Mint 19.2 and followed the documentation on installing on Ubuntu. This appeared to work until I entered the command
sudo gem install refinerycms
which failed with the error message:
ERROR - failed to build gem native extension
mkmf.rb - can't find header files for ruby at /usr/lib/ruby/include/ruby.h

Naturally the command:

rails server also fails. Is there any point in continuing to attempt to install this application or will I simply be led down a rabbit hole?
regards
Mike
ariticas
@ariticas

0

Im trying to create a new refinery application with

$ refinerycms rickrockstar

But I get the following error:

Unable to activate refinerycms-2.1.5, because bundler-2.1.2 conflicts with bundler (>= 1.2.2, < 2.0) (Gem::ConflictError)

Ive updated my bundler package to bundle 2 but to no avail. At the same time when I try to add the refinery gem to nay existing projects I get a lot of dependency issues. any advice is greatly appreciated thank you so much!

Anita Graham
@anitagraham
@ariticas you can prefix each command with bundle exec to ensure that you are running the command in the same bundled environment. For instance bundle exec rake db:migrate. (I have an alias be defined to make it easier to type)
Brice Sanchez
@bricesanchez
@michaelgmanning you will need Ruby on Rails knowledge to use Refinery CMS. If you only want to test the CMS, you should use our "deploy button to Heroku" it's the easiest way to test the CMS on a free hosted service
Matt White
@whitethunder922_twitter
Hello all, I'm new to the CMS world. Refinery looks like a pretty good candidate for what I'm trying to do. In short, I have a client who needs his rental business website re-done and he knows other folks who want the exact same kind of site, so he wants me to build a white-label version of his site that he can then re-sell. So 2 questions: 1. Does Refinery sound like the right tool for the job, and 2. Is it possible to host more than one Refinery site out of the same Heroku dyno, or does each site need its own? Thanks!
Brice Sanchez
@bricesanchez
Hi @whitethunder922_twitter! You probably could do all you want we Refinery! It's basically multiple Rails engine that you can extend/override.

I've already done this type of work for an old client, i've created this extension : https://github.com/refinerycms-contrib/refinerycms-multisites

It works but it should be updated to the latest Refinery version

Also, you could use Refinery as Backend and feed multiple Static website generators
It depends your needs
Matt White
@whitethunder922_twitter
@bricesanchez Thanks for your input! I don't want to get too far into the weeds here, but there will be some elements for this that will be shared between clients (business logic primarily), but then some that aren't (user info, inventory, payment info). I'm unfamiliar with multisites - is this essentially what they are? And do they use separate database instances per site or some type of composite key for looking up data?
Brice Sanchez
@bricesanchez

but then some that aren't (user info, inventory, payment info)

In this refinery extension, you can configure which models you want to share between tenants (the logic is done by this gem https://github.com/influitive/apartment) : https://github.com/refinerycms-contrib/refinerycms-multisites/blob/master/lib/generators/refinery/multisites/templates/config/initializers/apartment.rb#L10

I'm unfamiliar with multisites - is this essentially what they are?

I think yes.

And do they use separate database instances per site or some type of composite key for looking up data?

By default, Apartment gem use PostgreSQL schemas : https://github.com/influitive/apartment#notes-on-postgresql. So one database, multiple schemas.

Matt White
@whitethunder922_twitter
@bricesanchez interesting. Is it possible to use different URLs for each site?
Brice Sanchez
@bricesanchez
@whitethunder922_twitter Yes, for my needs i used subdomains but it will be also possible to use primary domains
Matt White
@whitethunder922_twitter
Thank you @bricesanchez ! Very helpful.
Brice Sanchez
@bricesanchez
@whitethunder922_twitter You're welcome!
javoor1
@javoor1
Hello! I'm new to Refinery and I am following the extending model guide. https://www.refinerycms.com/guides/extending-models. It seems that a method you are using, the 'alias_method_chain' is no longer available in ruby 2.0 or newer. Is there another way to permit new fields in the contoller when extending a model? @bricesanchez Thank you!
Brice Sanchez
@bricesanchez
Hi @javoor1! Sadly, this guide is outdated, if you want to permit new fields in the controller, you can do something like this : https://github.com/refinery/website/blob/master/app/decorators/controllers/refinery/admin/pages_controller_decorator.rb
javoor1
@javoor1
@bricesanchez thank you very much! I included the params in the gem controller itself, maybe no the best practice. Then I tried with prepend but couldn't make it work.
Brice Sanchez
@bricesanchez
@javoor1 yes it's not a good practice to change the gem controller itself
did you restart your app after adding your decorator?
celine
@celineSAV_gitlab
Hello! I'm working for a company who is currently using refinery cms for their website, but they would like to change host without loosing their domain. Could you help me? Thank you so much. @bricesanchez
Anita Graham
@anitagraham
Big thanks to Brice (@bricesanchez) and Phillip(@parndt) for all the work they are doing to make Refinery Rails 6 compatible. Just looking at the Zeitwerks changes. :clap: :clap: :clap:
@celineSAV_gitlab I'd suggest making a duplicate of your website on your new host and get that working under an alternate domain name (dev.realdomain.com?). When you are happy with that you can change the real domain name DNS to point to the new site.
Brice Sanchez
@bricesanchez
Thanks @anitagraham! We are closed to fix it, after that we will be able to do a bunch of releases
Hi @celineSAV_gitlab ! Anita gave you a great advice. If you need a specific help to achieve this task, you can hire one of us.
javoor1
@javoor1
Hello Everyone. Someones knows about this error? I'm following the guides https://www.refinerycms.com/guides/extending-models but can't get to make it work.
ActiveRecord::RecordNotFound in Refinery::Events::EventsController#show
Couldn't find Refinery::Events::Event with 'id'=event_types
Anita Graham
@anitagraham
@javoor1 Have you added different fields to the model? The example I see adds a background image to the page model but doesn't deal with events. Can you show us what you've done?
Dovercourt Boys and Girls Club
@dovercourtkids_twitter
hi there, does anyone know why the initial home page won't show up?
Anita Graham
@anitagraham
@dovercourtkids_twitter need more info
Forrest Chang
@fkchang
@joebutler2 or anyone else. Could use some help debugging s3. I'm running against Rails 5 so I'm using sha 81ed9917c0ed528bdcb0d91bbecf408d3c89706a that I found searching, which got me running. I followed your steps in generating the config/refinery/dragonfly.rb file, which finally allowed my s3 creds to take hold, but Dragonfly is still using a file data store. Would I need to patch in the PR you did for before_serve ? Thanks