thin

Starting thin server on different ports

为君一笑 提交于 2019-12-19 02:49:24
问题 I'm a newbie o thin. I have a ruby on rails application. Today I can start the application normally, by the command sudo thin start -d We have created a new database for tests. (one is a clean database, and he other is for testing so can be messed up) on the database.yml file. I would like to start the same application in two different ports using the different databases. To start an application with the database I can use the ENV option of thin: sudo thin start -d -e production -p 3040 It

Thin server: ouput rails application logs to console, as 'rails s' does

余生颓废 提交于 2019-12-18 16:41:28
问题 I need to run thin start or thin -ssl ... start within the root of my rails app, and see the application logs output to the console, similar to what rails s does 回答1: In config.ru file, located at the root of your application, add the following code, just before the line run Rails.application : console = ActiveSupport::Logger.new($stdout) console.formatter = Rails.logger.formatter console.level = Rails.logger.level Rails.logger.extend(ActiveSupport::Logger.broadcast(console)) 来源: https:/

Thin with SSL support and ruby-debug

家住魔仙堡 提交于 2019-12-18 04:13:11
问题 Does anyone know of a way to run the ruby debugger and SSL at the same time with Thin? I've been using Thin successfully with Rails 3.0.10. I start it using rails server --debugger , and I can debug my code. Recently, I have also needed to add SSL support to my application, and I'd like to be able to test it locally with a self-signed certificate. Unfortunately, I have not found a way to start Thin with SSL support when using rails server . I can successfully start Thin with SSL support by

How to preserve request url with nginx proxy_pass

♀尐吖头ヾ 提交于 2019-12-17 17:25:35
问题 I was trying to use Thin app server and had one issue. When nginx proxies the request to Thin (or Unicorn) using proxy_pass http://my_app_upstream; the application receives the modified URL sent by nginx ( http://my_app_upstream ). What I want is to pass the original URL and the original request from client with no modification as the app relies heavily on it. The nginx' doc says: If it is necessary to transmit URI in the unprocessed form then directive proxy_pass should be used without URI

Cannot install thin on windows

人走茶凉 提交于 2019-12-17 10:33:04
问题 I cannot install thin gem on windows. Something happen during build of native extensions. Do anybody face same issues? Here is the stack trace: >gem install thin --no-ri --no-rdoc Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing thin: ERROR: Failed to build gem native extension. C:/Ruby/bin/ruby.exe extconf.rb checking for rb_trap_immediate in ruby.h,rubysig.h... no checking for rb_thread_blocking_region()... yes

Cannot install thin on windows

左心房为你撑大大i 提交于 2019-12-17 10:32:28
问题 I cannot install thin gem on windows. Something happen during build of native extensions. Do anybody face same issues? Here is the stack trace: >gem install thin --no-ri --no-rdoc Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing thin: ERROR: Failed to build gem native extension. C:/Ruby/bin/ruby.exe extconf.rb checking for rb_trap_immediate in ruby.h,rubysig.h... no checking for rb_thread_blocking_region()... yes

HTTP query string length with thin web server

时光怂恿深爱的人放手 提交于 2019-12-14 02:59:12
问题 When performing a GET request to my rails application (with thin web server), I got the following error: Invalid request: HTTP element QUERY_STRING is longer than the (1024 * 10) allowed length. The application is part of a prototype for a master thesis, and the use of GET (not POST) requests is most important. Is there a way to change the query string length? 回答1: To change the query string max length of thin you have to change its native C extension parser. Just change this line in the file

'rails server' starts thin twice, shuts both down. Cucumber still works

╄→гoц情女王★ 提交于 2019-12-13 03:44:53
问题 My rails application fails to start up in development mode. It appears to work in both production and test mode. Here is what I get when I run 'rails server': Thin web server (v1.5.1 codename Straight Razor) Maximum connections set to 1024 Listening on 0.0.0.0:51960, CTRL+C to stop Booting Thin Rails 3.2.11 application starting in development on http://0.0.0.0:3000 Call with -d to detach Ctrl-C to shutdown server Thin web server (v1.5.1 codename Straight Razor) Maximum connections set to 1024

Rails Server dies with EAFNOSUPPORT - Windows 10, Ruby 2.4, Rails 4.2,Thin

て烟熏妆下的殇ゞ 提交于 2019-12-13 03:34:04
问题 I can run rake tasks and a console, but the development server dies a few moments after launch before I make any requests to it. It seems like it has something to do with IPV6 based on the ::1 address but I can't find where I can do anything about that. Any ideas? C:\Rails Projects\cfhtrust>rails s [factory_girl warning, below] => Booting Thin => Rails 4.2.11 application starting in development on http://localhost:3000 => Run `rails server -h` for more startup options => Ctrl-C to shutdown

Where does Puma log to

独自空忆成欢 提交于 2019-12-12 10:30:55
问题 I have been using Thin to run my ruby Sinatra applications but I am now switching over to Puma. Thin creates its own log log/thin.log which I use. I noticed that Puma doesn't produce a log file (not that I can see). I have tried googling for documentation around this but not really found anything. I was wondering if/how you can specify a log path in Puma. Any help would be much appreciated. Alex 回答1: Check the example config.rb as recommended on the repo's README. As shown there: # Redirect