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.

269 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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 ...
DrFredEdison's user avatar
6 votes
1 answer
598 views

Rails with phusion passenger and wordpress

We had a site developed using on ruby on rails. It had Website Web services for mobile app Admin panel to manage data. We started using wordpress to manage site content. We have finished ...
Venu's user avatar
  • 215
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 { ...
Orkhan's user avatar
  • 59
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 ...
Bill Billingson's user avatar
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....
tiny's user avatar
  • 51
4 votes
0 answers
1k views

Coreos auto scaling with docker and fleetctl on AWS

I spent a lot of time evaluating different ways to deploy an application to the cloud (let's assume AWS for this question) in the last few weeks but couldn't really find a satisfying solution. We ...
Daniel Torres's user avatar
4 votes
0 answers
319 views

Rails 4 Unicorn+Nginx on Ubuntu 13.04 VPS keeps crashing

I bought a years subscription at bluevm.com (found some coupon code, it was only about $15 for a whole year) to launch my first Rails Production server. I'm running Nginx with Unicorn and MySQL on ...
NomNomCameron's user avatar
4 votes
1 answer
214 views

AWStats combine page URLs

I'm running AWStats on a Rails site with nginx and I have pages that are accessed like this http://mysite.com/order/receipt/[receipt_tag] I'd like for AWStats to show those as x hits for page /order/...
Jon's user avatar
  • 41
4 votes
0 answers
444 views

How to add SSL for localhost in RAILS

I want to test my application which needs to work both with and without SSL. If it is possible to set up SSL for a local application (http://localhost:3000), please let me know some suggestions, my OS ...
loganathan's user avatar
4 votes
1 answer
679 views

Is Apache ReverseProxy to Passenger Standalone an acceptable production deployment?

I have the need to deploy Rails 3 apps, using RVM and gemsets, and am expecting “public” traffic (i.e. this is not an internal-only app). I also must use Apache as the public interface to my app. I ...
davetron5000's user avatar
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 ...
Whit Kemmey's user avatar
3 votes
0 answers
533 views

Puma + Nginx permission denied on files that don't exist

Getting an error in the nginx logs: [error] 6193#6193: *1 open() "/home/ubuntu/app/assets/bootstrap.min-2e2a039f4eb020ba4438b6e2ad6a83748c14257a60f68facd2d72df75c452969.css" failed (13: Permission ...
user58446's user avatar
  • 141
3 votes
0 answers
219 views

Multiple ruby on rails web apps running on one directory in Apache without modifying/adding <Directory> all the time

What I am trying to do is to create multiple ruby apps in one Apache directory and when I go to http://localhost/appname the ruby app resolves without problems. However, I want to do this dynamically ...
Victor Luna's user avatar
3 votes
0 answers
2k views

Determining Rails max threads and database pool size using Puma and NGINX

I noticed the default pool size for a Rails 5 App using Puma is equal to: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> Which means that you can establish a max number of threads as an ...
Jorge Cuevas's user avatar
3 votes
0 answers
987 views

Server CPU at 100 Percent and not responding using PUMA and Nginx

My Server CPU is at 100 percent and not responding using PUMA and Nginx after one or two days. I use 4 workers. Up to now I had a look at the problem with strace, which leads to the following Output ...
dan_0's user avatar
  • 131
3 votes
0 answers
334 views

Should i run Rails behind Apache/nginx?

I am slowly approaching deployment of a company internal Rails application, and am trying to find out whether i should be running the application server behind Apache/nginx in production. Currently ...
Vesther's user avatar
  • 31
3 votes
1 answer
195 views

Application specific environment on the same server in Nginx/Passenger

I have two Rails applications (say app1 and app2) deployed using Nginx/Passenger. The server definition in nginx.conf looks like this: server { rails_env demo; client_max_body_size ...
dexter's user avatar
  • 81
3 votes
0 answers
439 views

Phusion Passenger setting PassengerPreStart does not activate using service httpd start

I'm running Phusion Passenger on RHEL, hosting a Rails application. I can successfully start up a passenger instance on Apache startup using the Passenger setting PassengerPreStart, but only if I ...
Jose Hales-Garcia's user avatar
3 votes
0 answers
1k views

Rails, Capistrano, Nginx, Unicorn - Application has been already initialized (RuntimeError)

Can anyone shed some light on what exactly this error refers to? I'm having trouble deploying new versions of the site. I, INFO -- : reloading config_file=[snip]/current/config/unicorn.rb I, INFO -...
Andy Copley's user avatar
3 votes
1 answer
979 views

Unable to deploy a rails application using eb cli

I recently updated my environments configuration to :64bit Amazon Linux 2015.03 v1.4.6 running Ruby 2.2 (Passenger Standalone). After deploying my application using eb deploy i now get an error in my ...
Colin Wagner's user avatar
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 ...
bryanus's user avatar
  • 131
2 votes
0 answers
1k views

How can I start puma under a specified user/group?

I'm using Rails 5 and the Puma 3 gam on CentOS. Is it possible (and how?) to specify the user and group under which puma runs when it is started? I need to start it with the appropriate user/group ...
Dave's user avatar
  • 214
2 votes
1 answer
73 views

Heroku - Distributing monolithic Rails app

We have a pretty sizable monolithic Rails app that has a few functions (in parenthesis is the estimated % out of the total codebase): Marketing site when users are not logged in: homepage, additional ...
criticerz's user avatar
2 votes
0 answers
144 views

Unexplained massive rmagick temporarily file

Problem We recently ran into a situation whereby some of our server instances were suddenly running out of disc space, evidenced by below graph: The reason for running out of disc space is a single /...
Jack's user avatar
  • 646
2 votes
1 answer
707 views

Start Rails on boot for AWS EC2

i have a ubuntu EC2 instance and i want start my rails server at boot. So i have a script: start.sh #!/bin/bash # # Start Rails Server cd ~/spree rails server -d and i have this in my rc.local: rc....
SaroVin's user avatar
  • 130
2 votes
1 answer
70 views

Posting url of rails application on FB without https replace meta tag description with "welcome to nginx"

I have a rails application deployed on an amazon ec2 ubuntu instance, configured with nginx which is working fine. The problem is when I try and post the url of the site on facebook without https ...
Zaeem Asif's user avatar
2 votes
0 answers
3k views

Apache 2.4 & Phusion Passenger generating 403 Error

I'm trying to setup a Rails application (Project Fedena) on the following Server configuration. I am using the virtual host configuration below. I get a 403 when I visit the IP/Domain. There's only ...
Ralph's user avatar
  • 892
2 votes
1 answer
116 views

Strange request every 2 seconds from local IP (127.6.205.1), which overflows logs (OpenShift)

I get a strange request every 2 seconds from 127.6.205.1. My production.log (Ruby on Rails) file looks like so: > ... I, [2015-01-16T15:05:23.491062 #79682] INFO -- : Started GET "/" for 127.6.205.1 ...
dortonway's user avatar
  • 121
2 votes
0 answers
940 views

How to setup cross domain rules in discourse?

So i use the following page to gather information from the user and send it to forums.awake-gaming.com/posts for discourse to make a post for me . Url of page : awake-gaming.com/join-us.html Url, ...
Abhishek Gupta's user avatar
2 votes
0 answers
254 views

Deploying sinatra app on rails app sub uri using( unicorn and nginx)

I have rails app running on unicorn+nginx. below is the nginx.conf and unicorn.rb configuration. nginx.conf upstream unicorn { server unix:/tmp/unicorn.todo.sock fail_timeout=0; } server{ ...
Pravin Mishra's user avatar
2 votes
1 answer
736 views

setup Nginx, uwsgi for RAILS app on non-root location

I've set up and run a RAILS app (graylog2), and the below config made it work for root location: server { server_name www.mydomain.com; location / { gzip off; uwsgi_modifier1 ...
HVNSweeting's user avatar
2 votes
1 answer
822 views

Apache2 Ruby on rails and Redmine changing the rail app url

Hello I successfully set up my Redmine server (Ubuntu 12.04LTS, Apache2, Passenger, Mysql using the guide at http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_Ubuntu ). However I ...
user83438's user avatar
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 - ...
Divya Bhargov's user avatar
2 votes
1 answer
386 views

How to create a Capistrano task to import a backup from production into local development db?

I'm trying to do something with a Capistrano task that is similar to the heroku db:pull functionality if you are familiar with it. I have a remote server. On that server I have a bunch of backups in ...
Daniel Fischer's user avatar
2 votes
0 answers
623 views

Passenger on apache hangs taking up all application processes with very high CPU IO Wait

I'm running a set of rails apps on a server under Apache/Passenger. One of the apps keeps getting into a state where the load on the machine gets very high and the machine becomes unresponsive with ...
Marc's user avatar
  • 21
2 votes
0 answers
4k views

How to load environment variables with Unicorn

I can't seem to get my server to load up the environment variables. In my ideal setup I would like 1 user (deployer) to serve multiple applications on a single server. Ubuntu 12.04, Nginx, Unicorn. ...
SpoBo's user avatar
  • 121
2 votes
1 answer
802 views

portforward ec2 instance to localhost for rails development

I'm trying to work with facebooks real-time updates but I'm having trouble giving facebook a callback address that they can use. My dev machine is behind a firewall so I want to use an ec2 instance to ...
spinlock's user avatar
  • 183
2 votes
0 answers
604 views

Problems installing Gitorious on Debian 6.0.4

i am trying to install Gitorious on latest Debian 6.0.4 but i am running into some problems and hope there is somebody out here who might be able to help. I followed this article: http://gitorious....
Thomas's user avatar
  • 21
2 votes
1 answer
211 views

Both virtualhosts pointing to same application. Apache, passenger, rails 3

A couple of months ago I set up a rails app using apache, passenger and virtualhost and I (eventually) got everything working fine. Now I am trying host another application on the same box. I've added ...
Hinchy's user avatar
  • 143
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 ...
user avatar
2 votes
1 answer
487 views

lighttpd and mod_proxy with PHP

I am trying to create a rather complex setup using a combination of lighttpd, some custom Ruby proxies, rails/ramaze (running on Thin), and PHP. Currently it is setup like this: A browser issues the ...
user avatar
2 votes
0 answers
385 views

Passenger/Rails not releasing memory

I have an Ubuntu server running three separate Rails (2.3.8) applications with Passenger, REE and Apache. Recently we started experiencing problems with ruby processes eating up memory and consuming ...
Michael DeLorenzo's user avatar
2 votes
1 answer
1k views

Reverse Proxy (mod_rewrite) and Rails (absolute paths)

I have front end rails app, that reverse proxies to any of a number of backend rails apps depending on URL, for example http://www.my_host.com/app_one reverse proxies to http://www....
SooDesuNe's user avatar
  • 141
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 ...
tsvallender's user avatar
1 vote
0 answers
102 views

nginx unicorn rails authentication failure

I am following this tutorial to deploy a rails app on my cloud server. It's my first time deploying a rails project on a server. When trying to start unicorn or nginx from folder /app/current and user ...
oooOOO000m000OOOooo's user avatar
1 vote
0 answers
528 views

Sidekiq not starting on Ubuntu 18.04 LTS in production

I am trying to run Sidekiq in production using Systemd. I am receiving the following error when trying to start sidekiq. /bin/bash -lc "bundle exec sidekiq -e production -C config/sidekiq.yml -L ...
jeffci's user avatar
  • 121
1 vote
0 answers
1k views

Nginx responding with 429s but I don't have it configured in my config

I'm hosting a rails app on AWS elastic beanstalk and am noticing my nginx server returning 429s in the nginx log. The problem is, I'm not seeing where the limit_req is being defined so I'm struggling ...
Johnny's user avatar
  • 11
1 vote
0 answers
26 views

Shouldn't UFW configured Iptables deny access before the request reaches our Unbutu 16.04 hosted Nginx server?

We are using ufw to configure iptables. We have numerous rules denying access from ip addresses that use bots. Here is one example: sudo ufw deny from 0.1.0.0/0.1.255.255 These bots are attempting to ...
Jay's user avatar
  • 191
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 ...
Rs Graphics's user avatar
1 vote
0 answers
295 views

Nginx will only use error pages with certain filenames

Using Nginx I am able to get the default error pages to work for 404 and others, but only if I name the file exactly after the error code, i.e. 404 -> 404.html... 40x.html doesn't seem to work. I ...
user8897013's user avatar

1
2 3 4 5 6