In my refinerycms 4.0.3 app, a logged-in refinery user can always access his own user page. This is necessary for example if they want to change their password.
However, on the user page, any user can also control their own plugin access. This rrenders the whole plugin access selection meaningless. Has this been fixed in newer versions?
I made a temporary hack where only a superuser can see and select plugin access permissions.
However, on the user page, any user can also control their own plugin access. This rrenders the whole plugin access selection meaningless. Has this been fixed in newer versions?
Are you sure you're not a superuser?
I'm trying to install refinerycms-blog into an existing rails 6 app that uses devise, I'm getting the following error,
Bundler could not find compatible versions for gem "railties":
In Gemfile:
administrate-field-active_storage (~> 0.3.0) was resolved to 0.3.5, which depends on
rails (>= 6.0) was resolved to 6.0.3.2, which depends on
railties (= 6.0.3.2)
refinerycms-blog was resolved to 4.0.0, which depends on
responders (~> 2.0) was resolved to 2.0.2, which depends on
railties (< 5, >= 4.2.0.alpha)
my gem file contains...
gem 'responders', '~> 2.0'
gem 'refinerycms-blog', git: 'https://github.com/refinery/refinerycms-blog', branch: 'master'
gem 'refinerycms-authentication-devise', git: 'https://github.com/refinery/refinerycms-authentication-devise', branch: 'master'
I haven't seen anything in the closed issues...
I have PR or two in the works, but I also have some problems that I don't know how to fix.
refinerycms-wymeditor
uses a call to find-asset
which gets an error ActionView::Template::Error: undefined method
find_asset' for #<Sprockets::Manifest:0x00007fd3fd15d0f0>`, which has been reported and fixed. However I still get the problem when testing.# Gemfile.lock
refinerycms-wymeditor (2.2.0)
refinerycms-core (>= 4.0.0, < 5.0)
refinerycms-testing
defines a helper refinery_login
. However if I'm running tests in a gem such as refinerycms-inquiries
, which uses refinerycms-testing
I need to add refinery_login
in a helper.Any ideas for how to fix my basic setup?
I find that installing a new refinerycms is a multi-step task. Once you have a basic installation up you need to update 1. Your Gemfile to ensure you are using the latest refinery gems from Github, and update your config/database.yml
and build the database in the db of your choice.
```
I need to save and serve some images programmatically, and I don't want to mix them up with user-controlled images in Refinery::Images
. Is it possible to create a custom resource type like :news_images
which would use Refinery::Dragonfly
datastore? Has anyone done that? I imagine this would involve creating a new config file, say config/initializers/refinery/news_images.rb
, and cloning and adjusting files from the images
folder of refinerycms gem.
Or alternatively I could use plain Dragonfly (without Refinery) and create a custom Dragonfly.app
.
We have Refinery::Resources
and Refinery::Images
. But why only two? And The images cannot even be organized in folders (AFAIK). This file upload and organization system should be more versatile.
# models/refinery/caststone/component
dragonfly_accessor :drawing, app: :caststone_components
and
# lib/refinery/caststone/components/configuration.rb
config.dragonfly_name = :caststone_components
config.dragonfly_url_format = '/system/refinery/drawings/:job/:basename.:ext'
The dragonfly_url_format
has a different path from the standard image path.
Depending on your needs you could have a look at ActiveStorage. This is handy if you have users uploading files, and offers more storage options than just S3 and local.
Rails also now has the image_processing
gem, which allows you to choose a different image handler (mini-magick or vips) and offers
Provides higher-level image processing helpers that are commonly needed when handling image uploads.
This gem can process images with either ImageMagick/GraphicsMagick or libvips libraries. ImageMagick is a good default choice, especially if you are migrating from another gem or library that uses ImageMagick. Libvips is a newer library that can process images very rapidly (often multiple times faster than ImageMagick).
@anitagraham Thanks. I ended up using the same technique – plain dragonfly for my extra needs. I already have config/initializers/refinery/dragonfly.rb
, and added another initializer, config/initializers/dragonfly.rb
, which contains:
if Rails.env.development? || Rails.env.test?
datastore :file,
root_path: Rails.root.join('public/system/dragonfly', Rails.env),
server_root: Rails.root.join('public')
else
datastore :s3,
bucket_name: ENV['S3_BUCKET'],
region: ENV['S3_REGION'],
access_key_id: ENV['S3_KEY'],
secret_access_key: ENV['S3_SECRET'],
url_scheme: 'https',
root_path: 'newsmodules'
end
And in my model, simply dragonfly_accessor :image
A field image_uid
is required in the database, as indicated in the Dragonfly documentation. The S3 bucket has a folder newsmodules
.
@anitagraham This is rather old, but anyway. You wrote "Hi. I have a troubled relationship with Git."
Isn't the basic technique to create a fork, say, "myownfork", and then git push github myownfork
(assuming github)? And to the main repository of the gem, push master as usual.
Hello Everyone, I am working on one of the rails project where I have to upload some files to S3, using refinerycms (using dragonfly).
I am successfully able to connect to S3 with dragonfly. But we have almost 10K files in our local env( which was uploaded when app was being tested).
Now I need to copy these files to S3 (done, tried to make same path as local upload path of dragonfly).
Local path of dragonfly uploaded resources is like (public/refinery/images/2021/11/01/
). But when I tried uploading files/images to S3 with path (2021/11/01/12/10/55/hash/
means with time as well).
I tried to change so many things from configurations file of dragonfly initialization mostly I tried changing (url_format
but looks like nothing is working. )
Does anyone have Idea how to tackle this situation.
Thanks in Advance.
Hello everyone!
I'm new at Refinery and I need to use Cloudinary for my Refinery project.
Do you have any idea how can I integrate Cloudinary instead of S3?
Hello Team!
Can anyone help me to get RefineryCMS pages HTML content access in my rails application view pages
Basically we are creating HTML pages using refinery CMS and now wanted to display the content what we wrote in that CMS pages to our rails application view page
@bhavesh8000 You are most probably looking for this:
rake refinery:override view=refinery/pages/show
In the same way you can override these, and probably you must remove app/views/
from the beginning of the path, and .html.erb
from the end:
app/views/refinery/_footer.html.erb
app/views/refinery/_head.html.erb
app/views/refinery/_header.html.erb
Here is a list of some (not all) things that you can override.