WebFaction
Community site: login faq

This isn't so much a technical question, as maybe a philosophical one:

What's the difference between a rails application (that you install via the WebFaction panel) and the actual rails application (with the public/, app/, db/ directories etc...).

I understand that the first installs more of a Rails environment, with nginx + passenger, a gems dir, etc, BUT should I be installing a new environment with EACH new 'application'?

Do most people name the environment the same as the application?

Thanks!

asked 29 Mar '11, 06:50

christophers...
122
accept rate: 0%


I understand that the first installs more of a Rails environment, with nginx + passenger, a gems dir, etc, BUT should I be installing a new environment with EACH new 'application'?

Not necessarily.

You can actually run multiple 'applications' (in the Rails sense) from a single 'application' (in the WebFaction sense).

We create an Rails application named 'hello_world' inside of '~/webapps/<app>/hello_world'. You can feel free to generate new Rails apps, put them wherever you like and just add them to your nginx.conf.

Do most people name the environment the same as the application?

Yep :)

permanent link

answered 29 Mar '11, 06:58

David L ♦♦
1.4k13
accept rate: 45%

If one is building multiple apps (in the Rails sense), in what cases would you recommend putting them all in one app (in the WebFaction sense), as opposed to each Rails app in its own WF app?

One case I wonder about in particular is if one had development, test, and production "versions" of the "same" app.

~ Thanks, Ken

(20 May '15, 02:57) kenatsun

The rule of thumb is that (rails) apps related to the same website all go together, and unrelated ones are separated into different (webfaction) applications.

So, in this case, the dev/test/prod rails apps would go together, since they're all for the same website. But if you started a new website, you'd make a new WebFaction application for that one.

The only real reason to try to merge multiple websites into a single (webfaction) application would be to run all of them from a single Nginx+Passenger instance, and thus to save memory.

That approach is fine if you prefer it, but it's not the de-facto standard because it increases complexity. For instance, it implies that all of your websites rely on the same set of gems, so you either need to be sure upgrades for one application won't break another application, or you need to manually separate the gems directory for each (rails) app.

(20 May '15, 05:09) ryans ♦♦

Got it. That makes sense. Thanks, Ryan!

(20 May '15, 17:57) kenatsun
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×108
×81
×54
×11
×2

question asked: 29 Mar '11, 06:50

question was seen: 4,135 times

last updated: 20 May '15, 17:57

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM