carrierwave-mongoid | Mongoid support for CarrierWave
kandi X-RAY | carrierwave-mongoid Summary
kandi X-RAY | carrierwave-mongoid Summary
Mongoid support for CarrierWave
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- mount_field_upload_field_attachment with model_upload_attachment_field_field_attachment_path
carrierwave-mongoid Key Features
carrierwave-mongoid Examples and Code Snippets
Community Discussions
Trending Discussions on carrierwave-mongoid
QUESTION
I'm using Rails-Admin for the dashboard of Rails app. But on dashboard, the icons are all same - white square.
Screenshot for Broken Icons:
Here is the gemfile
...ANSWER
Answered 2017-Dec-17 at 14:12I think you need to use font-awesome
gem. I had the same issue before.
Rails admin uses an old version of fontawesome. Download the zip file here: http://fortawesome.github.io/Font-Awesome/3.2.1/assets/font-awesome.zip
Then put the following files into the /public/assets
directory of your rails project, from the /font
directory in the zip file:
QUESTION
Need a little guidance please.
I set this up pretty much default with AvatarUploader
via carrierwaveuploader/carrierwave-mongoid and the files save fine via Gridfs
The problem is when I use an image_tag
I get the url that looks like http://some.domain.com/images/uploaded/users/avatar/:user_id/:file_name
I need the image to be viewable publicly The docs do not really tell you what to do.
I cannot access this file via HTTP for the image_tag
. I get No route matches [GET] "/images/uploads/user/avatar/...
Any ideas? I am new with carrierwave.
Rails 5.0.2, carrierwave (0.11.2), carrierwave-mongoid (0.10.0), mongoid (6.0.2)
...ANSWER
Answered 2017-May-17 at 19:00After no help and more research I found what to do.
Using my image_url http://some.domain.com/images/uploaded/users/avatar/:user_id/:file_name
You first need to create a GridfsController
then create the methods for sending the data:
QUESTION
I am using carrierwave to upload my image but failed. Please help me.
Versions used:
...ANSWER
Answered 2017-Jan-12 at 06:24After viewing the source of CarrierWave::Workers::StoreAsset#perform
,
the reason why the image cannot be uploaded is because of embedded documents.
The line from source record = resource.find id
will return nil
because resource
is an embedded class and you cannot find id by an embedded class.
To solve the problem, see here. My code should work if I add the following:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install carrierwave-mongoid
Follow the "Getting Started" directions in the main Carrierwave repository.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page