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.
911
questions
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 ...
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
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 ...
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
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
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 ...
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
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 ...
0
votes
0
answers
2k
views
NGINX Is redirecting to localhost:3000
I'm using ruby on rails in a docker container running my website https://redrebelgames.com on port 3000. I'm trying to setup NGINX to redirect http:// traffic to https:// and redirect port 80 to port ...
0
votes
1
answer
2k
views
EC2: Relatively small network out spikes cause 100% CPU usage
Background
Hello,
I have a server I'm running on a free EC2 instance. I'm using nginx and passenger/rails as my web server and application server.
The server receives little traffic (still in ...
0
votes
1
answer
589
views
Connecting to db via SSH on docker fails
I'm trying to connect to a database via SSH from my docker container. I'm getting an error
could not connect to server: Connection refused
Is the server running on host "0.0.0.0" and ...
0
votes
0
answers
48
views
add an asp .net core application to a ruby on rails site hosted on a linux server
I am new to web hosting, and please forgive my ignorance.
my company has a website, and the site is an Ruby on Rails application with Passenger hosted on a linux server.
I would like to know if it is ...
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 ...
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
846
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:...
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 ...
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 ...
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 ...
0
votes
1
answer
127
views
Get rid of content ripping bots in a Rails 4 app served by Nginx using Passenger on Ubuntu 16.04
Our rails app is being inundated with requests from bots that are trolling using IP addresses. Every request results in an exception notification error message.
Our original Nginx server block:
server ...
0
votes
1
answer
465
views
Apache to serve multiple ruby on rails applications from the same domain
I want to serve multiple different ruby on rails applications using Apache and
Passenger via a single domain. The applications all should use the same certificate and
I want to deliver the apps using ...
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
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
170
views
Deploy Rails app to Ubuntu 18.04 or 20.04?
I have an existing Rails app that's been sitting on an old Ubuntu 14.04 server on AWS, and I've recently moved the staging environment over to a new AWS EC2 instance running Ubuntu 18.04.
I'm not a ...
0
votes
0
answers
144
views
Failed to run multiple Rails apps with Unicorn + Nginx on single AWS EC2 Instance
I know this issue has been discussed several times but I had no luck and I couldn't fix the issue.
I am going to run multiple Rails apps on AWS EC2 Instance with Unicorn and Nginx.
I could run one ...
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
0
answers
174
views
Installing Discourse, after creating admin the website turns blank
While installing Discourse from source I successfully got to the point of displaying my site. After adding admin with “RAILS_ENV=production bundle exec rake user:create” the website went blank, white ...
0
votes
1
answer
612
views
403 Forbidden with apache and passenger
I am getting sporadic 403 responses from a server running Passenger within Apache. The problem starts on seemingly random occasions, and ends randomly as well. From the log, it seems that Apache is ...
0
votes
1
answer
398
views
Ruby on Rails Deployment to Server resulting in old Wrapper Scripts
I'm trying to deploy my RoR Application to an Ubuntu (Latest Version with Updates) Server.
The Application will run with the Gem "Passenger". However, i am unable to run Passenger.
rvmsudo bundle ...
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 ...
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,...
0
votes
1
answer
97
views
gcloud app deploy error(Ignoring mysql2-0.3.21 because its extensions are not built. Try: gem pristine mysql2 --version 0.3.21)
I'm in trouble with GAE(GoogleAppEngine) deployment.
I've done two turorial.
https://cloud.google.com/ruby/getting-started/using-cloud-sql?hl=en
https://cloud.google.com/ruby/getting-started/using-...
0
votes
1
answer
552
views
Nginx + Passenger: Cache 404 urls
Context
I have a Rails app with a nginx server and Passenger.
The app is dynamically generating pages based from the request url: if the url exists in the database the app renders the corresponding ...
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 ...
0
votes
0
answers
232
views
Puma hangs after upgrade from Debian 9.7 to 9.8
I have a frontend with Nginx talking to Puma over a Unix socket in two separate containers. The base image for the Puma container is ruby:2.5-slim. After clearing my Docker cache two days ago and ...
0
votes
1
answer
1k
views
File size increases while uploading to nginx server and fails
I'm uploading a .wav file of size around 5745kb, the limitation in the nginx config is set as
client_max_body_size 10m;
The upload fails with error as "Request entity too large" and content-...
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
...
1
vote
0
answers
27
views
ProxyPass just displays folder contents of rails app that is running on port 3000
I have a personal site I'm working on and its the first time I try to configure a server to run multiple apps. So far just getting one to be found through the url instead of with a port number has ...
1
vote
0
answers
505
views
/home/webapp: No such file or directory elastic beanstalk
When I deploy my ruby app on aws using elastic beanstalk. Following error occur.
pass log
App 20278 stdout: intializing git
App 20278 stderr: error: could not lock config file /home/webapp/.gitconfig:...
0
votes
0
answers
66
views
gitlab installation failing on debian 9.6
I'm having a issue on Debian 9.6. When installing gitlab an error is returned:
Setting up gitlab (8.13.11+dfsg1-8+deb9u3) ...
Creating/updating gitlab user account...
Making gitlab owner of /var/lib/...
0
votes
1
answer
1k
views
Unable to push recent changes to old ruby website on heroku
To be honest, I am not a ruby developer. I am working on certain fixes on a ruby website. It's hosted on Heroku server.
The changes I have made doesn't involve adding or removing any gem but only ...
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 ...
0
votes
0
answers
196
views
Use default `ubuntu` user to deploy an app or make separate users?
I have a Ruby on Rails app and use Capistrano to deploy it to the server.
The deploy user and the user running the app is the same - the default ubuntu user. (this has sudo access: ubuntu ALL=(ALL) ...
0
votes
2
answers
2k
views
Should I expect Google App Engine to randomly restart instances?
I had one instance of the app (shame on me), running in the australia-southeast1 region yesterday.
Last night was a critical time for the app; people were relying on it working flawlessly, and then ...
0
votes
1
answer
4k
views
nginx: [warn] conflicting server name
I haven't been able to figure out why I'm getting this error:
nginx: [warn] conflicting server name "stage.mydomain.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "stage....
1
vote
0
answers
2k
views
AWS Elastic Beanstalk ACM SSL certificate installation without load balancing
Reading through the AWS docs just now, it appears that:
I can get a free SSL/TLS certificate from Amazon for use with certain AWS services. This is facilitated via the ACM (AWS Certificate Manager) ...