thin

Ruby - no PID found in tmp/pids/thin.pid (Thin::PidFileNotFound)

随声附和 提交于 2019-12-23 16:25:17
问题 I'm trying to start thin for my app but then the pid cannot be generated: $ thin -C /var/www/project_path/current/config/myproject.testing.yml start Now I can't stop it because there is no pid: $ thin -C /var/www/project_path/current/config/myproject.testing.yml stop /home/usr/.rvm/gems/ruby-1.9.2-p180@api/gems/thin-1.5.1/lib/thin/daemonizing.rb:131:in `send_signal': Can't stop process, no PID found in tmp/pids/thin.pid (Thin::PidFileNotFound) This is the yml file: pid: /home/usr/htdocs

Starting a Thin cluster on Windows

你离开我真会死。 提交于 2019-12-23 05:25:11
问题 I have a ruby app on my machine that I'm trying to deploy with a batch script. I've got everything up to the server handled. This is what I'm using: cd to/path/of/app thin start -p 3001 This works. cd to/path/of/app thin start --servers 3 As per http://code.macournoyer.com/thin/usage/, does not work. I get an error "lib/thin/runner.rb:142:in 'parse!': invalid option: --servers" Any idea why this isn't working? 回答1: On line 88 in lib/thin/runner.rb it says # Daemonizing not supported on

Thin LoadError: no such file to load thin_parser

青春壹個敷衍的年華 提交于 2019-12-22 09:15:54
问题 I have installed thin and try to do thin start , which end up with this error C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- C:/Ruby192/lib/ruby/gems/1.9.1/gems/thin-1.2.8-x86-mingw32/lib/1.9/thin_parser (LoadError) from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thin-1.2.8-x86-mingw32/lib/thin.rb:48:in `rescue in <top (required)>' from C:/Ruby192/lib/ruby/gems

Thin doesn't respond to SIGINT or SIGTERM

╄→гoц情女王★ 提交于 2019-12-22 06:59:57
问题 bundle exec thin start -p 3111 gives the following output: Using rack adapter Thin web server (v1.2.11 codename Bat-Shit Crazy) Maximum connections set to 1024 Listening on 0.0.0.0:3111, CTRL+C to stop ^C Ctrl-C doesn't do anything (SIGINT). Neither does kill (SIGTERM). I've found a few references to this behavior, but no solutions. The problem seems to be either in eventmachine (bundled with latest thin), in ruby 1.9.2-r290, or in the linux kernel (Ubuntu 10.4 LTS, 2.6.38.3-linode32). It

How to silently start Sinatra + Thin?

拟墨画扇 提交于 2019-12-22 04:55:07
问题 I have a Sinatra::Base webservice which I want to start from a command line Ruby program, so I have this: # command line program file require 'mymodule/server' puts "Running on 0.0.0.0:4567, debugging to STDOUT..." MyModule::Server.run! bind: '0.0.0.0', port: 4567, environment: :production This works as expected but it throws out: $ myscript Running on 0.0.0.0:4567, debugging to STDOUT... == Sinatra/1.3.1 has taken the stage on 4567 for production with backup from Thin >> Thin web server (v1

Rack Sessions getting lost in Chrome

会有一股神秘感。 提交于 2019-12-21 17:34:37
问题 I have an pretty simple app hosted on EC2 built with Sinatra, served with thin behind nginx. The problem is that with Chrome, the session variables get 'lost' in Sinatra. It does not happen in Firefox. This is using Rack::Session::Cookie. This is similar to this issue: Sinatra not persisting session with redirect on Chrome Any insights in how to solve this issues in Chrome would be appreciated. 回答1: Make sure you are setting the following: configure :development do set(:session_secret, 'a

Using rails sync gem with Faye and Thin in production mode on Heroku

。_饼干妹妹 提交于 2019-12-21 05:41:01
问题 I'm trying to set up the 'sync' gem to enable real time updates in my rails app. This uses Faye as a real time push service and thin as the webserver. I"m VERY new to this. So any advice is appreciated. I have this working on my local server, but don't know how to get it working in production mode on heroku. This is my setup: In my gemfile: gem 'faye' gem 'thin', require: false gem 'sync' In my root folder, I have a sync.ru file require "bundler/setup" require "yaml" require "faye" require

Can't start thin server as service, RubyGems: Could not find thin

[亡魂溺海] 提交于 2019-12-21 02:34:36
问题 I used the following instructions to install and configure the Thin server as a service on Ubuntu 10.04.4 with Rails 3.2.3: http://articles.slicehost.com/2008/5/6/ubuntu-hardy-thin-web-server-for-ruby Thin server works fine running it from the application root, using 'thin start' However, when I try to run the service using any of these commands: service thin start sudo service thin start /etc/init.d/thin start sudo /etc/init.d/thin start I get the following error: /home/myuser/.rvm/rubies

Should I use thin or unicorn on Heroku Cedar

假如想象 提交于 2019-12-20 08:24:36
问题 I recently 'upgraded' my app to the cedar platform on Heroku. By default, I am using thin as a web server. But I have always been tempted to use unicorn for concurrency and having my dyno dollar go father. But I worry there are some gotchas in using something other than Thin. Does anyone have real-life experience with this decision? Notes: This was the article that got me excited about the idea: http://michaelvanrooijen.com/articles/2011/06/01-more-concurrency-on-a-single-heroku-dyno-with-the

Facing intermittent 404 issue when calling Rails API

江枫思渺然 提交于 2019-12-20 04:56:34
问题 I have banged my head on this for 2 days now and i dint find any luck yet. Looking for help on this. The issue: Front End makes 10 similar XHR requests ( for different users ) to my Rails API and few of the requests randomly fails with 404 status code. My Observations: If i make the same request again, It passes. I dont see any trace of 404 requests even hitting my server ( using logs ). I do see different response headers for 200 and 404 ( mentioned below ) and i see cowboy ( https://github