Save 36% for Black Friday! Learn more

Neba Funwi-gabga


90 Experience
0 Lessons Completed
0 Questions Solved


Posted in File Uploads with Refile Discussion

OK Chris I got this working...maybe someone else is facing the issue but this is what I realized...RoR was not picking up environment variables, so the PATH which indicates the location of Identify executable was not being read. What I did:

1- In my ~/.profile I made sure it was loading both .bashrc and .bash_profile (initially it was only loading .bashrc)

2- I then created a ~/.bash_profile, where I put in my environment variables:
export PATH=$PATH
3- Restarted the server: sudo service nginx restart

Bammm...with this my images showed up and even my SMTP settings which were also not working are being picked up now. Thanks for your suggestions.

Posted in File Uploads with Refile Discussion

Thanks Chris, but Yes I installed with apt-get and when I do "which identify" it shows /usr/bin/identify. I also have the /usr/bin in my PATH, but still getting the same error. I used your other tutorial on "Deploying to Digital Ocean" to do the deployment...think there's anything in there that could cause this?

Posted in File Uploads with Refile Discussion

Thanks for this episode Chris. I implemented this and it works on my development server just fine. But when I deploy to production (Digital Ocean Ubuntu 16 with Capistrano and Nginx), i see the images upload just fine to s3 bucket, but unable to retrieve them. My nginx error log says:
"App 494 stdout: Refile::App: Error -> ImageMagick/GraphicsMagick is not installed"

but I have both imagemagick and graphicmagick installed on my server. What could be the problem here?

How to do this with Refile gem?

Hi Chris,
How easy is it to extend this so that if a payment does not succeed (say a renewal), the user's account is downgraded to basic (Free) account automatically?

Posted in File Uploads with Refile Discussion

There appears to be a problem with refile gem when using nested forms? I have a profiles form nested inside a users form, but when I upload the image, nothing happens. No errors are given, but profile images are not uploaded either. Anyone noticed this?

Ok, it is working now. I think another javascript in my template was causing a few errors. I took care of all javascript errors that were showing up in the console and suddenly card update is working again. Thanks for your pointers Chris.

Yes, the user has a stripe_subscription_id. In fact, cancellations and resubscriptions are fine, but the error comes in the card update.

Thanks again Chris for this. For some reason my "Card update" is giving the following error:
"Invalid source object: must be a dictionary or a non-empty string. See API docs at"

I have exactly the same code as you do. When I inspect the element on this page it says:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Not sure why, but has anyone witnessed this issue? See screenshot for error message. Thanks.

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.