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
238 votes
7 answers
340k views

How to force or redirect to SSL in nginx?

I have a signup page on a subdomain like: https://signup.example.com It should only be accessible via HTTPS but I'm worried people might somehow stumble upon it via HTTP and get a 404. My html/...
Callmeed's user avatar
  • 2,725
30 votes
4 answers
11k views

Prevent mail being marked as spam

This is a canonical question about avoiding outgoing mail being classified as spam. Also related: Fighting Spam - What can I do as an: Email Administrator, Domain Owner, or User? What ...
jonepatr's user avatar
  • 405
25 votes
6 answers
9k views

What dir should I deploy Rails apps into?

What would be a reasonable and logical directory into which to deploy my production Rails apps on a Linux system? Some candidates... /var/rails <= There's a /var/www so this would be consistent ...
Agvorth's user avatar
  • 2,459
21 votes
2 answers
16k views

Restore a versioned S3 bucket to a particular point in time

Let's say I've got S3 versioning enabled for my bucket: http://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html Then, let's say someone (for example, junior employee) messes up the S3 bucket (...
elsurudo's user avatar
  • 313
16 votes
2 answers
10k views

Optimal number of per CPU unicorn processes

We are running a Ruby on Rails web app under Unicorn. Our app is not strictly CPU bound (we have a dual Xeon E5645 system w/12 cores and a peak load average value is around 6). We started with 40 ...
Alex's user avatar
  • 7,949
12 votes
1 answer
1k views

Different ways to restart Apache?

I've got an Apache question here. For my entire career as a developer, I've been restarting Apache like this: sudo /etc/init.d/apache2 restart I just today deployed my first Rails application, but ...
Chris Allen Lane's user avatar
11 votes
3 answers
2k views

MySQL replication across geographically separate servers

My organisation has been looking into how to spread our servers around geographically while keeping backups very up to date, and ideally spreading the load. The initial thing I have in mind is Rails ...
Hamish Downer's user avatar
11 votes
5 answers
8k views

Amazon EC2 Ami recommendations for free tier?

Amazon web services recently introduced a free tier, where you basically get free stuff to try out AWS and run tiny sites and projects. Basically it's free as long as you remain below a certain limit ...
Console's user avatar
  • 447
10 votes
5 answers
36k 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. ...
Chris R's user avatar
  • 533
9 votes
1 answer
4k views

What causes a 400 Bad Request error for null ("") and why would our nginx logs have so many?

Daily logs from Logwatch regularly report 400 Bad Request, null: 1744 Time(s) from our nginx logs. The log entries look like: 123.123.123.123 - - [25/Jan/2011:14:44:19 -0500] "-" 400 173 "-" "-" ...
johnml's user avatar
  • 203
9 votes
2 answers
1k views

API Management Solutions [closed]

I'm currently building an API and am looking for a tool to allow me to monitor (in a GUI) and rate-limit usage. I've come across a few enterprise solutions including: http://apigee.com/ http://...
Mike's user avatar
  • 103
8 votes
1 answer
7k views

Can't access ports assigned to Rails 4.2, but 4.04 works fine

I have Ruby 2.1.2 installed and Rails 4.2. Bundle install runs without error. I can do a Rails C without error. Rails s -p3004 launches with webrick or thin without error When I browse to ...
UnConundrum's user avatar
8 votes
2 answers
2k views

What are the pros and cons of using Nginx over Apache with Rails when using Passenger

Passenger recently got support for Nginx, what are the pros and cons of it over Apache as a web server for Rails applications?
Theo's user avatar
  • 2,795
7 votes
2 answers
31k views

lost connection after STARTTLS: Postfix

I've setup a Postfix + Courier server and have a Rails app configured with the SMTP server settings. Whenever the Rails app tries to send an email, this is what appears in the Postfix log (additional ...
webo's user avatar
  • 183
7 votes
2 answers
6k views

How do I get yarn installed on elastic beanstalk?

Currently you can't install yarn using yum so there doesn't seem to be an easy way to create a config that installs it before asset pre-compilation.
chaostheory's user avatar
7 votes
2 answers
6k views

Firefox and Chrome keeps forcing HTTPS on Rails app using nginx/Passenger

I've got a really weird problem here where every time I try to browse my Rails app in non-SSL mode Chrome (v16) and Firefox (v7) keeps forcing my website to be served in HTTPS. My Rails application ...
Steve's user avatar
  • 71
7 votes
2 answers
436 views

Are there any features in Linux that are essential for hosting Ruby on Rails?

I'm on a project where we're going to be hosting a Ruby on Rails app on a Linux server we own. Are all flavors of Linux equally capable of hosting Rails apps? If not, what features are present in some ...
Kevin's user avatar
  • 224
7 votes
4 answers
2k views

Running Rails3 with force_ssl = true, with nginx, on AWS EC2 with SSL terminated by an ELB, setting up health check

I want to run my entire Rails app with SSL, so I thought to use Rails' global force_ssl config option, which works great, except that the ELB's healthchecker will never work because if I set it to ...
Alejandro Wainzinger's user avatar
7 votes
5 answers
356 views

good LAMP/Rails admin reference for VPS?

I just switched to a VPS after years of shared hosting, so I need to brush up on my administrative skills. Years ago I was a UNIX admin, but I'm rusty, and in particular don't know the details of ...
Jason's user avatar
  • 193
7 votes
1 answer
10k views

How do I increase the logging level for Puma?

Currently I am only getting ActiveRecord and view-rendering output in my Rails application log file, since I switched to Puma from WEBrick. I haven't been able to find where I can modify the output ...
Ernie's user avatar
  • 191
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 ...
acoustic_north's user avatar
6 votes
1 answer
5k views

Does rails 4 asset_path helper uses asset.prefix? [closed]

I configured my rails app to use a different asset prefix, by editing the file conf/application.rb. +config.assets.prefix = '/wrapper/thing' It works for asset pipeline but when I try to use it on ...
Leandro Moreira's user avatar
6 votes
2 answers
4k 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:...
afarley's user avatar
  • 213
6 votes
2 answers
2k views

Elastic Beanstalk Rails - Modify passenger config passenger_max_pool_size

I need to increase the passenger_max_pool_size for my Rails application running on passenger. I have used Elastic beanstalk for deployment. Any idea, how to go about this? Is there an optionsetting or ...
Divya Bhargov's user avatar
6 votes
3 answers
17k views

Virtualhost setup for Ruby on Rails application (mod passenger)

I'm trying to install Redmine under apache. The apache server works on a local network. My apache setup consist on a single virtual host. I can get insto different directories using simply the path ...
Ingo86's user avatar
  • 61
6 votes
1 answer
1k views

Is there a backend-aware load balancer for Rails/Passenger?

We have 3 Ruby on Rails applications (A, B and C) installed on a number of application servers. Our front end is HAProxy, backend is Apache + Phusion Passenger. Originally we had all 3 Rails apps ...
Alex Kaushovik's user avatar
6 votes
2 answers
7k views

Passenger + nginx: application doesn't run in production mode

I'm using Passenger + Nginx to run a Rails app. If i use "rails_env development;" the application works fine. But if i run in production mode, i get "We're sorry, but something went wrong.". I did ...
Fernando's user avatar
  • 1,199
6 votes
2 answers
13k views

How to set up Apache with Passenger (mod_rails) on Mac OS X?

I'm an iOS developer, so I have very little experience with Apache and RoR, and it's the first time I'm trying to use Mac OS X as server. http://rubyonrails.org/deploy recommends using Phusion ...
Erik B's user avatar
  • 181
6 votes
2 answers
4k views

What should my Nginx rewrite rules be for Rails with Passenger for page caching in a subdirectory?

I'm using Nginx 0.7.64, Passenger 2.2.9, Rails 2.3.5. I have my page caching directory set to /public/cache, and I'd like to be able to serve cached pages when requested over HTTP, but always hit the ...
Ian Terrell's user avatar
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 ...
EightyEight's user avatar
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
593 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
3 answers
5k views

Using Upstart to manage Unicorn w/ rbenv + bundler binstubs w/ ruby-local-exec shebang

Alright, this is melting my brain. It might have something to do with the fact that I don't understand Upstart as well as I should. Sorry in advance for the long question. I'm trying to use Upstart ...
codykrieger's user avatar
5 votes
1 answer
7k views

Can't connect to Ruby on Rails Development Server on Centos 6.3

I've having trouble connecting to my Ruby on Rails development server: When I type in 192.168.0.10:3000 into a web browser on a different the connection just times out. I suspect the problem is with ...
sandyscott's user avatar
5 votes
2 answers
12k views

how to disable email confirmation in gitlab in private network

Recently I installed the gitlab for my LAN. When my users are trying to create their accounts they are getting email confirmation message. Now my question is I want to disable whole email confirmation ...
ashok's user avatar
  • 229
5 votes
4 answers
4k views

How should secret files be pushed to an EC2 (on AWS) Ruby on Rails application?

How should secret files be pushed to an EC2 Ruby on Rails application using amazon web services with their elastic beanstalk? I add the files to a git repository, and I push to github, but I want to ...
Sooth's user avatar
  • 161
5 votes
4 answers
6k views

Operation not permitted when starting Unicorn

I've created an nginx/unicorn/capistrato setup on Ubuntu (Amazon EC2) by following mostly this guide. I guess everything is set up like it should but when I start Unicorn I get (a LOT of) this error ...
fiskeben's user avatar
  • 171
5 votes
2 answers
14k views

how to enable redmine (ruby on rails) logging?

For some reason my RedMine install never gets any log files. Redmine is an open source project management system written with Ruby on Rails. I'm a total newbie to Ruby or Rails. Have searched the ...
Wayne's user avatar
  • 428
5 votes
2 answers
10k views

Varnish configuration to only cache for non-logged in users

I have a Ruby on Rails application fronted by varnish+nginx. As most of the sites content is static unless you are a logged in user, I want to cache the site heavily with varnish when a user is logged ...
davidsmalley's user avatar
5 votes
2 answers
477 views

maintenance/installation of ruby gems/ruby on rails on Linux in general and Gentoo

I am currently looking into Ruby/Ruby on Rails as an alternative to Python/Django. My main problem is that it is rather unclear what the best practices are when it comes to installing Ruby gems and/or ...
khaos's user avatar
  • 213
5 votes
2 answers
2k views

How to decide the optimal number of ruby thin/mongrel instances for a server, number of cores?

We are trying to deploy mongrel instances on a machine. What is the optimal number of mongrel instances for a server? Since an instance can handle concurrent connections, I do not see any benefit in ...
Amala's user avatar
  • 529
5 votes
1 answer
10k views

How do I set up mod_auth_cas for a VirtualHost?

I have the following in /etc/apache2/httpd.conf: Include /private/etc/apache2/passenger_pane_vhosts/*.conf I have the following in /etc/apache2/passenger_pane_vhosts/my_site.conf: LoadModule ...
James A. Rosen's user avatar
5 votes
1 answer
1k views

Pre-populate vagrant synced folder contents

I'm currently building an rather complicated server stack (a ruby on rails app) that I want developers to be able to work on without having to install everything themselves. Therefore I use Vagrant to ...
user125756's user avatar
5 votes
2 answers
996 views

Apache mod_proxy to another server

I am using the proxy_balancer in Apache2 to proxy requests to a Rails application to my rails server on the port the application is running on. This is how its set up... Rails Server Mongrel running ...
trobrock's user avatar
  • 237
5 votes
1 answer
5k views

Nginx & Passenger - failed (11: Resource temporarily unavailable) while connecting to upstream

I have an Nginx and Passenger setup that is proving problematic. At relatively low loads the server seems to get backed up and start churning results like this into the error.log: connect() to unix:/...
Toby Hede's user avatar
  • 309
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
9 answers
1k views

384 MB enough for a starter VPS?

I'm considering to rent a VPS with 384 MB memory. It would run on CentOS and would have cPanel with Apache 2 / MySQL and Phusion Passenger with nginx / sqlite. What do you think, will it have enough ...
user avatar
4 votes
5 answers
3k views

-rwxr-xr-x@ meaning

I have a file with an @ after the permissions -rwxr-xr-x@ 1 riccardotacconi staff 215 14 Sep 14:21 Capfile Do you know its meaning. I am deploying a Rails application using Capistrano. That ...
rtacconi's user avatar
  • 745

1
2 3 4 5
19