Created
April 8, 2011 10:30
config.ru for using POW Rack server with Rails 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rails.root/config.ru | |
require "./config/environment" | |
run ActionController::Dispatcher.new |
Updated with mgomes' suggestion
Pay attention: when you deploy the app you need to remove the config.ru, otherwise you get a bunch of issues, like "missing rails version..."
Thanks!
thank you!
FYI: this really isn't the best way to do things. I had some Rails metal stuff and couldn't get it to load until I pasted the contents of "rake middleware" into the config.ru file. Mine ended up looking like so:
# Rackup file required for Pow.cx
require File.dirname(__FILE__) + '/config/environment'
use Rack::Lock
use ActionController::Failsafe
use ActionController::Session::RedisSessionStore
use Rails::Rack::Metal
use ActionController::ParamsParser
use Rack::MethodOverride
use Rack::Head
use ActionController::StringCoercion
use Sass::Plugin::Rack
use ActiveRecord::ConnectionAdapters::ConnectionManagement
use ActiveRecord::QueryCache
run ActionController::Dispatcher.new
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That path to environment.rb caused me problems. This fixed it: