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.

learn more… | top users | synonyms (1)

69
votes
6answers
46k views

How to force or redirect to SSL in nginx?

I have a signup page on a subdomain like: https://signup.mysite.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 ...
11
votes
3answers
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 ...
11
votes
1answer
410 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 ...
10
votes
2answers
4k 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 ...
10
votes
5answers
6k 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 ...
9
votes
4answers
16k 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. ...
9
votes
5answers
3k 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 ...
9
votes
2answers
825 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/ ...
8
votes
1answer
1k 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 "-" "-" ...
7
votes
5answers
319 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 ...
6
votes
2answers
179 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 ...
6
votes
3answers
12k 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 ...
6
votes
2answers
9k 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 ...
6
votes
2answers
3k 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 ...
6
votes
1answer
2k 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 ...
5
votes
9answers
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 ...
5
votes
2answers
8k 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 ...
5
votes
2answers
8k 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 ...
5
votes
2answers
220 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 ...
5
votes
2answers
1k 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 ...
5
votes
2answers
3k 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 ...
5
votes
2answers
825 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 ...
4
votes
5answers
586 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 ...
4
votes
9answers
190 views

RubyOnRails Inexpensive Hosting Service [closed]

I am looking for a hosting service to host RoR (Ruby on Rails) applications. Please suggest hosting services where I can get an inexpensive plan. What are the best options out for hosting when you ...
4
votes
3answers
3k 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 ...
4
votes
5answers
4k views

How do I serve Ruby on Rails applications on Windows Server 2008?

I have spent the last several hours attempting to get Ruby on Rails running on a Windows server with no luck. At first I tried configuring a test application through IIS7's FastCGI support, but the ...
4
votes
5answers
5k views

Running Ruby on Rails App on Apache + Passenger == to much memory

I'm running redmine (a RoR app) on my server using passenger / Apache 2.2. Passenger and ruby are using way too much memory. Is there a more memory effective way to run redmine/ruby? I only need to ...
4
votes
1answer
213 views

Copy ferret index to other servers?

I've inherited a legacy rails application that I recently moved wholesale to AWS. Part of the infrastructure is a ferret index that exists on each of the ten backend application servers that build ...
4
votes
2answers
632 views

Which VPS configuration would be better?

I currently have a VPS at HostingRails.com, and am rather disappointed with the service so I have been considering switching to linode instead. I have three rails applications (my live application, ...
4
votes
2answers
523 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 ...
4
votes
1answer
1k 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 ...
4
votes
3answers
3k views

Is it possible to use custom script for authentication with PAM?

I want to enable users to use my rails application's credentials for login to sftp account. If I understand correctly I should somehow use PAM for this. But I didn't find any info on how to do this?
4
votes
2answers
7k views

Multiple Rails sites using Passenger and VirtualHosts?

What I am trying to do is run multiple Rails apps from a server machine at work. We dont have multiple hostnames for the box. We want to host some rails apps on it as well as our php apps. Currently ...
4
votes
3answers
2k 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 ...
4
votes
1answer
1k views

How to achieve zero downtime with Passenger 3?

In the technology preview posts about Passenger 3 they discussed zero downtime: In Phusion Passenger 3 we’ve implemented zero-downtime web server restart. Phusion Passenger and the web ...
4
votes
1answer
2k 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 ...
4
votes
2answers
1k views

Nginx configuration leads to endless redirect loop

So I've looked at every sample configuration I could find and yet every time I try and view a page that requires ssl, I end up in an redirect loop. I'm running nginx/0.8.53 and passenger 3.0.2. ...
4
votes
3answers
2k views

SSL/HTTPS help with regards to Mongrel?

I have been looking all over and either I can't find anything or I can't find anything that works... so here I am. How can I go about setting up SSL/HTTPS with regards to Mongrel? Thanks in ...
4
votes
3answers
187 views

First steps in scaling servers up for a Ruby on Rails application

I'm running a RoR web application on a dual core AMD Athlon 4450e server w/ 8GB RAM and Ubuntu. It's doing alright, getting spikes up to 320 dynamic requests per minute, it's also handling all the ...
4
votes
1answer
96 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 ...
4
votes
1answer
338 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 ...
3
votes
2answers
240 views

Need to move a debian server from i686 to x86_64 architecture

I have a debian server that I need to move from one hosting provider to another. I don't really know how the old server was setup, all I know is that it's running a Ruby on Rails application with a ...
3
votes
1answer
243 views

What does this log mean?

While my application is running (with a lot of traffic), I see this in error log but I dont even understand what it is about. I guess it's optimizing some configuration but I need a more formal ...
3
votes
4answers
292 views

Excessive hosting costs

A client of mine is getting billed around ~$1400 per month for hosting. However the site is only averaging roughly 200 hits per day and it serves no large files nor videos. It's hosted with ...
3
votes
1answer
837 views

Nginx and Unicorn on separate machines

I've got a pretty standard Rails application running with Unicorn and Nginx all on one box. I'd like to split off the application itself and have Nginx on one machine and Unicorn (with the Rails app) ...
3
votes
2answers
561 views

Need to link WP Blog with Rails App on Heroku

I have a client who wants to migrate his Rails app to Heroku. However the client also has a blog associated with his domain that runs on WordPress. Currently, the WordPress blog is running happily ...
3
votes
3answers
4k views

Ignoring GET parameters in Varnish VCL

Okay: I've got a site set up which has some APIs we expose to developers, which are in the format /api/item.xml?type_ids=34,35,37&region_ids=1000002,1000003&key=SOMERANDOMALPHANUM In this ...
3
votes
1answer
485 views

Rails/Mongo across multiple different geo-regions

I have a system that by necessity requires physical presence in three or more different locations and I need advice on structuring in such a way that my database stays replicated in a timely manner ...
3
votes
3answers
264 views

Transparantly make multiple web applications available at a single address

I have multiple web applications running on their own http server, e.g. a ruby/rails application on port 8080 and a python/cherrypy application on 8081. Is it possible to make these transparently ...
3
votes
1answer
1k views

Prevent mail being marked as spam

This is a canonical question about avoiding outgoing mail being classified as spam. I'm wondering how to prevent my emails from my site being marked as spam? I'm using sendmail. I'm trying to ...