Join GitHub today
Copy the backup file to your computer. If the backup file is on a USB drive, disc, or uploaded to cloud storage, you'll want to copy it onto the computer's local storage first. You can place the file anywhere, such as on your desktop or in your Documents folder.
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upHave a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
commented Aug 27, 2014
Thanks so much for this project -- much appreciated! I'm getting the following error when trying to run unicorn:start :Here's the backtrace: Running unicorn_rails boots everything up fine.Thanks for any help you can provide! |
commented Aug 27, 2014
Put config.ru file on root directory of your Rails project, example for Rails-4 application |
commented Aug 27, 2014
@tab Thanks for getting back to me. I already have that in my config.ru file in the root of my app. I'm guessing Unicorn can't find it? |
commented Aug 27, 2014
Got it. Another tutorial had me setting my working_directory to /home/deployer/my_app ... it should have been /home/deployer/my_app/current Thanks for your help! |
closed this Aug 27, 2014
commented Aug 27, 2014
@jmccartie, I'm glad to see you got it! By the way you can use this unicorn.rb config file, it work with Rails-3 and Rails-4 applications. |
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
By Sam Roberts
Config File Syntax
The config file is
config.ru
if none is specified.Handling of config files depends on whether it’s
.ru
, or somethingelse. It’s important to define the application that rackup
will runcorrectly; failure to do so will result in mysterious runtime errors!With a .ru
config file
The config file is treated as if it is the body of
Also, the first line starting with
#
is treated as if it werecommand-line options, allowing rackup
arguments to be specified in theconfig file. For example:Would run with Ruby warnings enabled, and request port 8765.
(Detail: the
-p
option will be ignored unless the server supports the:Port
option.)With a .rb
, etc config file
The config file is required. It must assign the app to a global constantso
rackup
can find it.The name of the constant should be config file’s base name, stripped ofa trailing
.rb
(if present), and capitalized. The following configfiles all look for Config
:~/bin/config
config.rb
/usr/bin/config
example/config.rb
This will work if the file name is
octet.rb
:Auto-Selection of a Server
The specified server (from
Handler.get
) is used, or the first of theseto match is selected:PHP_FCGI_CHILDREN
is in the process environment, use FastCGIREQUEST_METHOD
is in the process environment, use CGI- If Puma is installed, use that
- If Thin is installed, use that
- Otherwise, useWEBRick
Automatic Middleware
rackup
will automatically use some middleware, depending on theenvironment you select, the -E
switch, with development
being thedefault:development
: CommonLogger, ShowExceptions, Lintdeployment
: CommonLoggernone
: none
![Rackup File Config.ru Not Readable Rackup File Config.ru Not Readable](https://uploads.toptal.io/blog/image/121155/toptal-blog-image-1473794069465-2e0f2fa87fd142bd2f0b1b7e6240db43.jpg)
CommonLogger isn’t used with the CGI server, because it writes to
stderr
, which doesn’t interact so well with CGI.