> Dnia piÄ tek, 16 grudnia 2011 08:57:02 Roberto De Ioris pisze: >> > This is rails 3.1.1. > > > Would it be possible for uWSGI to detect how to run rails (using --rack or -- > rails) and use this method? > Would it work if we had (for example) --smart-ruby option and if there is config.ru then uWSGI would run ruby app in the same way as it runs when --rack > option is given, and if not then it would use --rails method? > Or maybe presence of config.ru itself doesn't mean that we should use --rack? >
That's the problem, this was my first idea, but then i found a user on one of my servers running a sinatra app into a rails one...so a config.ru in a rails app directory. This kind of conditional config is somewhat i would like to generalize for 1.1. I have no clear syntax in my mind but i would like something [uwsgi] if-file = config.ru!rack=config.ru!rails=appdir ; am i on heroku ? if-env = PORT!http-socket=$(PORT)!socket=:3031 ; am i on unbit ? (no socket needed) if-env = UNBIT!!socket=:3031 ; am i django ? if-file = settings.py!django=true if-opt = django!module=django.core.handlers.wsgi:WSGIHandler() if-opt = django!env=DJANGO_SETTINGS_MODULE=%d.settings -- Roberto De Ioris http://unbit.it -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
