Questions tagged [ruby-on-rails]

Ruby on Rails is an open-source, MVC web development framework written in Ruby, optimized for programmer happiness and maintaining sustainable productivity. Many things are defined by convention, freeing you from having to re-invent things to stay productive.

Filter by
Sorted by
Tagged with
10 votes
5 answers
37k views

How can I set up Redmine => Active Directory authentication?

First, I'm not an AD admin on site, but my manager has asked me to try to get my personal Redmine installation to integrate with ActiveDirectory in order to test-drive it for a larger-scale rollout. ...
1 vote
1 answer
110 views

Is Mastodon remove-orphans safe when multiple instances sharing an S3 bucket?

I have two Mastodon v4.2.0 instances, a staging server and a live/production instance. They share an AWS S3 bucket for file storage. Both are hosted on DigitalOcean. Is the command RAILS_ENV=...
0 votes
0 answers
29 views

The way of logging at action of controller in Ruby on Rails for debug purpose

I am just trying to know if router is reaching to specific action of controller. In js, we are using console.log and var_dump in php. I tried with puts but it didn't work and I think it's because of ...
5 votes
1 answer
4k views

Unicorn workers timing out intermittently

I'm getting intermittent timeouts from unicorn workers for seemingly no reason, and I'd like some help to debug the actual problem. It's worse because it works about 10 - 20 requests then 1 will ...
0 votes
1 answer
96 views

mTLS on Heroku with Rails

We currently host on Heroku and we need to implement mTLS in front of our Rails app. What is a good strategy to achieve this? It seems like we need reverse proxy which knows how to deal with mTLS. ...
0 votes
1 answer
110 views

nginx in front of Rails

We want to put nginx with mTLS in front of our Rails app. We want that mTLS is turned on only if request goes trough specific domain. E.g.: I want that https://mypage.com works without mTLS, however I ...
3 votes
1 answer
7k views

Use of ProxyPassReverse to change Location response header

I am implementing a reverse http proxy: proxy.example.com This will forward requests to servers based on URI: proxy.example.com/server1 -> server1.example.com When a user requests proxy.example....
0 votes
0 answers
261 views

Monitoring access to nginx server and fighting bots?

I have a potential problem with bad bots, wanted some help dealing with the problem in the most correct way. I have a Rails app installed on an Nginx server with unicorn, I also have newrelic pro ...
2 votes
1 answer
4k views

Nginx Proxy to AWS ELB not passing HTTPS protocol to Backend Instances

This is my first ever question, so please go easy on me! I'm trying to set up an Nginx proxy server to auto-generate SSL certificates using OpenResty/Lua and LetsEncrypt, within a multi-tenant SAAS ...
2 votes
1 answer
4k views

Rails program is not being run on apache + passenger - only directory listing

I have successfully installed Phusion passenger + Apache 2 + Rails 3.1 program + git on a linux Debian 6. I ran passenger-install-apache2-module and followed the configuration instructions. I followed ...
1 vote
4 answers
11k views

nginx Permission denied error

I'm runnning nginx and unicorn to serve Rails application. Unicorn and Rails app works fine, but nginx can't open rails public directory with permission error and return 502 Bad Gateway. curl http://...
0 votes
1 answer
56 views

authorize multiple domains to send via send-only Postfix server

A rails application is sending an email to postfix for processing with From: do-not-reply@some_domain.top returning an error: [ActionMailer::MailDeliveryJob] [fa3df6b5-72a4-4a57-a5f8-ef7a98e4d8a9] ...
1 vote
1 answer
459 views

nginx serving content from wrong proxy

I have a single server hosting several Rails sites. All sites are identified by unique host names (all domain names map to the same IP address). Both Rails and nginx are running in Docker containers....
2 votes
1 answer
878 views

Webpacker can't find static assets

I created a Mastodon instance with DigitalOcean's preconfigured droplet which deploys version 5.3.5 of Mastodon on Ubuntu 20.04. I ran the setup wizard, then I immediately upgraded it to v4 of ...
0 votes
1 answer
2k views

Capistrano authentication to server fails but ssh for deploy user works

I've been working with capistrano for about a year deploying an app and everything went fine, until a couple of days ago when I got this ** [server_name :: out] fatal: Authentication failed after ...
0 votes
1 answer
2k views

Nginx + Unicorn Rails Application gets 404 when requests number are high

I have a Rails application deployed using Nginx + Unicorn. Last night, when the traffic peaked, Nginx was getting lots of 404 errors. When I dig into logs, those 404 requests on the nginx side did not ...
0 votes
1 answer
2k views

Unable to load urls in iframe on using ajax call

My application is deployed under haproxy server with domain name say fireapp.com, server1 and server2 are two servers below. Haproxy is configured to handle all requests under /live/ url format from ...
0 votes
1 answer
2k views

Host multiple Rack apps on one server with multiple ports (using Apache and Passenger)

I've search online and been reading documentation for Apache, Passenger, Rack, etc, but have yet to find a solution to my problem. I have several Rack (ruby)-based apps, located in /home/web/sites/...
1 vote
1 answer
2k views

Nginx proxying websockets, connections not closed

I'm confused about where the problem is located, but basically I have nginx proxying websocket connections to a backend ruby thin server, which services the connections with the websocket-rails module ...
2 votes
1 answer
4k views

Passenger could not spawn process for application. Rails, ubuntu, passenger and apache

My application is crashing again and again. I am using the hosting services of digital ocean the status of the server are also displayed in the image (It start working when I restart the server but ...
2 votes
1 answer
3k views

No data received - Passenger, (52) Empty reply from server

I had setup Elastic Beanstalk for my rails application last month (Passenger). All was good.. but all of a sudden, my servers are not responding well. My application access gives 'No data received - ...
0 votes
2 answers
2k views

Apache Passenger displaying my Rails application contents?

I have installed mod_rails (phusion passenger) for Apache on Ubuntu 11.10. Ruby and Rails are running fine, and so does mod_rails. I have setup a site on dev.localhost, which is my ruby app. The app ...
5 votes
2 answers
2k views

How to setup Proxy Cache with Nginx and Passenger

I use Nginx and Passenger for my rails application. I want to use proxy cache to cache my pages. However, every request go direct to my rails application. I don't know what wrong with my configuration....
6 votes
1 answer
1k views

Why isn't puma using all of its threads?

I'm using puma and nxinx, and as far as I can tell it is only ever using a single thread even when I start it with the default of 16 threads or more. I've set up a fresh rails app, then gone through ...
1 vote
1 answer
2k views

Puma with systemd and socket activation - Errno::EADDRINUSE

I have a Rails 5 app, running on puma 3.12.1, MRI 2.6.2, and Ubuntu 18.04. It used to run with pumactl and a custom control script but I want to configure it properly with systemd, using socket ...
1 vote
2 answers
985 views

Rails SSL running puma and EC2 AWS

Specs: Rails 4.2.4, Ruby 2.1.9, running puma, EC2 instance in production mode I have an SSL certificate that I want to install on my server but using techniques like this one yields no results ...
0 votes
1 answer
2k views

Rails 3 passenger nginx application spawner server error on Synology NAS

Question updated, please read UPD2. I'm trying to deploy app through passenger nginx module on DS710+ (ruby 1.9.2p0 installed). There is syntax error relative to has_and_belongs_to_many_association....
5 votes
1 answer
2k views

NGINX Unicorn 504 Gateway Time-out

I try all what I found in the Google by this question, but - nothing. It doesn't work anyway. My NGINX default: upstream app { server unix:/tmp/unicorn.rails.sock fail_timeout=0; } server { ...
7 votes
3 answers
5k views

Proper Passenger + Apache Permissions to fix error "No such file or directory - config/environment.rb"

I am having a problem with Passenger not being able to start due to an apparently common issue in which Passenger claims: No such file or directory - config/environment.rb. I have searched the web ...
0 votes
2 answers
2k views

nginx permission issue serving static file - RedHat 7 SELinux issue

This is a new installation which I followed the passenger+nginx guide. This will eventually be a rails site, but for now I am trying to get static files to serve, and am unable to figure out the ...
0 votes
2 answers
3k views

500 error with deploying rails application via apache2+passenger

I finally completed my own app, so the only work left is deploying the app. I'm using Ubuntu 10.04 and apache2(installed by apt-get), so I'm trying to deploy through passenger. I installed passenger ...
0 votes
1 answer
91 views

Rails 6 - Understanding AWS Pricing for CDN video on demand application

I am working on an Rails 6 application, already on production which is heavily dependent on AWS Services like S3, Lambda, Cloudtrail, SNS and CDN to serve a video-on-demand app, where users can upload ...
1 vote
0 answers
2k views

502 bad gateway errors after 68 concurrent users to website

I'm running into issues while doing some stress testing in jMeter. Essentially, we're hitting a hard limit of 68 concurrent users. As soon as the test ramps up to that number of users, we're getting ...
6 votes
2 answers
2k views

Creating a docker container from a capistrano deploy

I'm having a bit of a difficult time understanding how I can leverage my existing infrastructure code with Docker. I have a Ruby on Rails app that uses capistrano to push out deployments. I want to ...
2 votes
1 answer
2k views

Nginx Gzip not compressing JSON

I have tried various settings available for Nginx.conf, none of them are working for me. Below id my current config, gzip on; gzip_disable "msie6"; gzip_vary on; ...
0 votes
1 answer
1k views

AWS ElasticBeanstalk: Early termination of worker [puma] Loading development - gems?

I'm currently upgrading rails from 6 to 7 and so had to upgrade my eb platform-version as well (to run ruby-3.0). Now puma isn't able to start and always looping through: [13033] + Gemfile in context: ...
0 votes
1 answer
1k views

Why is /usr/bin/env permission denied to rails server?

I've just set up rails on an apache server running on Ubuntu, and when I try to go to the root page it gives this error: An error occurred while starting up the preloader. It exited before signalling ...
1 vote
1 answer
683 views

Elastic Beanstalk Puma NGINX - Ruby on Rails Load Issues

I have an Elastic Beanstalk instance running Ruby on Rails using Puma with Ruby 2.6 running on 64bit Amazon Linux/2.11.7, the instance is scaled to a c5.2xlarge and a database of db.m5.large. The ...
0 votes
1 answer
669 views

Rails application not working on AWS after upgrade to Rails 6.1.3

I recently upgraded my application to Rails 6.1.3. When I attempted to deploy the application to AWS the deployment failed with the error message "Following services are not running: application.&...
2 votes
1 answer
848 views

How do I configure the hostname for the GitLab NixOS service?

I am trying to deploy a new GitLab instance on NixOS 20.09.1632.a6a3a368dda (Nightingale). I have this rather minimal configuration.nix: { modulesPath, ... }: let host = "example.org"; ...
6 votes
2 answers
5k views

Why is bundler failing to find rake while deploying with Capistrano?

I have a Rails project which was running on Ubuntu 18.04, and I've just upgraded the system to Ubuntu 20.04. cap production deploy is failing at the step deploy:assets:precompile with: 00:07 deploy:...
0 votes
0 answers
444 views

Rails application with Apache on Windows Server

I need to migrate an existing Rails application (Redmine) on a Windows Server 2019 machine. It's been requested to use Apache as web server. The application runs correctly on localhost through webrick,...
1 vote
1 answer
613 views

Access denied for creating user on LDAP

I have a web application that needs to be able to create users on a LDAP. I have created a cn=intranet,dc=example,dc=com and I need it to be able to add users unside ou=People,dc=example,dc=com. So I ...
3 votes
2 answers
13k views

Should I add the user www-data? Trying to get Rails off the ground

I'm trying to set up a Rails application on a redhat server, and in accordance with instructions I have found on multiple tutorials, I wish to set the owner of certain directories to 'www-data' so ...
2 votes
1 answer
3k views

Bundle install freezing on sassc during Rails server deployment

I'm trying to deploy a Rails app using capistrano. The deployment script, initiated by cap production deploy runs fine, until this command: $HOME/.rbenv/bin/rbenv exec bundle install --path /home/...
1 vote
1 answer
2k views

Problems with .htaccess rewrite and Ruby on Rails/Redmine

I installed Redmine and so far everything runs smoothly. Now i want to add a rewrite rule via .htaccess in order to redirect requests from domain.tdl to www.domain.tdl. This is approach works fine ...
0 votes
1 answer
2k views

mysql root password is empty

I am trying to install mysql after i replaced my disk with MySQL on it with a bigger and faster one. After installing mysql-server on ubuntu, when running select user,host,authentication_string from ...
1 vote
0 answers
3k views

Redis is seeing legitimate connections as attacks - possibly due to reverse proxy?

I'm running Redis for use with Rails and Action Cable. These all sit behind an Nginx reverse proxy. Currently whenever Redis is connected to, I get # Possible SECURITY ATTACK detected. It looks like ...
0 votes
1 answer
2k views

Passenger not running (Ruby on Rails + Nginx)

My AWS instance was working fine with my app. But, today, the server was down without memory ram. Then I run: sync; echo 1 > /proc/sys/vm/drop_caches sudo service nginx start After that, ram ...
4 votes
1 answer
2k views

Rails when served by unicorn is generating the wrong fingerprint for precompiled assets

I have a production server with nginx -> unicorn -> rails. I precompile assets, which puts assets in public/assets with a fingerprint (hash) appended to the filename. However, when a web page is ...

1
2 3 4 5
19