Phusion passenger on Nginx not serving application on Port 80. Basically times out
Stack Overflow » Ruby On Rails
by Daniel Grenier
22m ago
I have been banging my head on the desk on this for quite some time. I have used the following guide to deploy my small Ruby on Rails application to a Digital Ocean droplet and run the app on a Nginx / Phusion passenger web server: https://gorails.com/deploy/ubuntu/22.04 Everything works fine up until I add the phusion passenger piece to the nginx config file. After I install nginx and start it. I can access my droplet IP and I see the "Welcome to Nginx screen" Once I ass the phusion passenger bits and pieces to the server block for my app, when I try to reach my droplet IP, it just sits there ..read more
Visit website
CSS not loading in PDF generated using Grover gem in production mode
Stack Overflow » Ruby On Rails
by Sachin Singh
2h ago
I am using grover gem to generate PDF from HTML template. Its working fine locally, but PDF looks UI less on production environment. I am using AWS cloudfront as CDN in production mode. Here is a snippet of my code. def download file_export = file_exports.find_by_guid!(params[:id]) grover = Grover.new(file_export.data, format: 'A4') send_data(grover.to_pdf, filename: "#{file_export.sanitized_file_name}.pdf", type: 'application/pdf') end Here file content is generated using. file_content = action_controller.render_to_string( template: 'performance/reviews ..read more
Visit website
How to load gem's Railites only after all config/initializers load?
Stack Overflow » Ruby On Rails
by KNejad
2h ago
I have a gem which conditionally loads RailsWarden::Manager, based on a flag in the config/initializers/mygem.rb file: module Mygem class Railtie < Rails::Railtie initializer "mygem_engine.initialize_warden" do |app| if Mygem.use_warden_middleware? app.config.middleware.use RailsWarden::Manager do |manager| # Config for RailsWarden::Manager end end end end end This worked fine in some consumers, but in others the use_warden_middleware? gets called before the corresponding line in the config/initializers/mygem.rb gets loaded, to set the va ..read more
Visit website
Rbenv + Ruby 2.5.3 + BUILD FAILED (macOS 14.4.1 on arm64 using ruby-build 20240423)
Stack Overflow » Ruby On Rails
by RahulOnRails
4h ago
Trying to install ruby 2.5.3 on Mac M1 Chip, Got below error ..read more
Visit website
Restrict routes access
Stack Overflow » Ruby On Rails
by Mosaaleb
4h ago
Let's say I have a route /authors/:id, and its partial is lazily loading the author books in a table with a lazy loading turbo_frame_tag, via the route authors/:id/books, this table also have show, delete, update, routes for each table row to allow updating, deleting a book. now everything works fine, but now users can access /authors/:id/books if they have typed the url and the other show, destroy, update routes. I don't want this page to be accessible outside of the author's show page, how can I restrict access to these pages if not in the context of author's show page ..read more
Visit website
Make Rails UrlWriter generate https links when SSL is terminated at Load Balancer and internal traffic goes via http
Stack Overflow » Ruby On Rails
by Evžen Frost
4h ago
I have following set-up in AWS: ElasticLoadBalancer (SSL termination) -> EKS -> application_pod with Nginx and my app. After load balancer there is http traffic and therefore I cannot force ssl in Rails application. At load balancer we have http -> https redirect but it has to be turned off to target pentest finding. E.g. no way to keep this redirect. We need to keep SSL termination at load balancer and have http traffic in EKS When I generate a links using url_for(...), it automatically sets http:// Is there any way to configure UrlWriter to produce https:// links but don't force SSL ..read more
Visit website
Unable to install gem Nokogiri 1.7.1 on Ruby 2.3.1 | Mac M1 | Sonoma OS
Stack Overflow » Ruby On Rails
by ADK
5h ago
I am trying to set up a legacy rails repo that runs on Ruby 2.3.1, on my Macbook (M1 Pro, Mac OS Sonoma). Upon bundle install, I get this error about Nokogiri 1.7.1. Have tried a bunch of suggestions online but nothing has worked so far. Any idea how to fix this? Tried the following xcode-select --install - Says that the installed command line tools are already up to date gem install nokogiri -v '1.7.1' --platform=ruby -- --use-system-libraries - Got the same error as above in the question manually tried installing gem install nokogiri -v 1.7.1 --source 'https://rubygems.org/' but got the err ..read more
Visit website
Rails load gem Railites after config/initializers all load
Stack Overflow » Ruby On Rails
by KNejad
5h ago
I have a gem which conditionally loads RailsWarden::Manager, based on a flag in the config/initializers/mygem.rb file: module Mygem class Railtie < Rails::Railtie initializer "mygem_engine.initialize_warden" do |app| if Mygem.use_warden_middleware? app.config.middleware.use RailsWarden::Manager do |manager| # Config for RailsWarden::Manager end end end end end This worked fine in some consumers, but in others the use_warden_middleware? gets called before the corresponding line in the config/initializers/mygem.rb gets loaded, to set the va ..read more
Visit website
No such file or directory @ rb_sysopen for watermark_image operation in rails v6
Stack Overflow » Ruby On Rails
by Tejas Ukalkar
7h ago
I'm trying to get watermarked image by sending get request from next.js front-end as follows: Here I'm sending event_image id so that I can access it in back-end and apply watermark to it then return to front-end `const handleImageDownload = async (eventImageId) => { try { const response = await getWatermarkedImageApi(eventImageId); if (response.status !== 200) { throw new Error('Failed to watermark image'); } const data = response.data; console.log(data); } catch (error) { setError(error.message); } finally { setLoading(false); } }` Now coming to rails back-end in event_i ..read more
Visit website
React Native Expo: Download a PDF generated by Rails wicked pdf gem that's stored in tmp folder
Stack Overflow » Ruby On Rails
by user24720087
10h ago
I am new to react native and I want to create a mobile version of the the project I made in Ruby on Rails. One part there is in my RoR project it's easy to generate and download a pdf file. I want also want to do it in a Mobile App. But well it's not working I've been asking a lot of question to my github co-pilot and chatgpt for answers but I can't still figure it out. I tested the RoR side since I am much familiar in that side and It generates the pdf file as expected the problem is the mobile app. Whenever I press the button it says it's successfully downloaded the file but I got prompt or ..read more
Visit website

Follow Stack Overflow » Ruby On Rails on FeedSpot

Continue with Google
Continue with Apple
OR