thin

Cannot restart thin via remote machine

浪尽此生 提交于 2019-12-12 01:45:12
问题 I use Thin to serve the rails application located on a test machine. I'd like to be able to stop/start thin from my local machine but the following does not work: ssh luc@test_machine '/home/luc/.rvm/gems/ruby-1.9.3-p125/bin/thin -v' I got the following error message: /home/luc/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find thin (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4]

Invalid request: Invalid HTTP format, parsing fails in Rails

狂风中的少年 提交于 2019-12-11 14:25:19
问题 While passing a string with special character i am getting Invalid request: Invalid HTTP format, parsing fails error. The error in log as follows. My Request: http://localhost:3000/search/% Error Log: Invalid request: Invalid HTTP format, parsing fails. /.rvm/gems/ruby-1.9.3-p545/gems/thin-1.6.2/lib/thin/request.rb:84:in `execute' /.rvm/gems/ruby-1.9.3-p545/gems/thin-1.6.2/lib/thin/request.rb:84:in `parse' /.rvm/gems/ruby-1.9.3-p545/gems/thin-1.6.2/lib/thin/connection.rb:39:in `receive_data'

rack-zippy and option -d in production env doesn't serve static assets

我们两清 提交于 2019-12-11 06:15:56
问题 I've a really weird problem here. I'm using the rack-zippy gem in my rails application and if I start it in development environment without pre-compiled assets it works like a charm. With the -d param and without. In production mode (same machine, same project, same directory, same gems) it works too. But if I start it with the -d param ( bundle exec rails server -d ) to daemonize the server, the pre-compiled assets will not be served. Can reproduce that with thin and webrick but NOT with

Ruby crashes on windows on using thin+ssl

自古美人都是妖i 提交于 2019-12-11 04:48:21
问题 I am using ruby on windows(ruby 1.9.3p194 (2012-04-20 revision 35410) [i386-mswin32_90]). And in my gemfile i have following:- gem 'rack', '1.4.5' gem 'thin', '1.5.0' Problem is when i am trying to start thin with ssl option by specifying :- ruby bin/thin --ssl -a 127.0.0.1 -p 44466 start I starts the server, but on accessing the https://localhost:44466 . I crashes ruby and gives the error on console and a popup comes saying ruby interpretor has stopped working. "This application has

Capistrano + thin + nginx with user not allowed to sudo howto?

梦想与她 提交于 2019-12-11 00:16:26
问题 I have a scenario like this which I want to use capistrano to deploy my ruby on rails application: The web application is on a thin cluster with the config file stored under /etc/thin. also an init script is in /etc/init.d/thin, so it would start automatically whenever my server needs a reboot Also nginx is executed the same way (as an init script daemon) To make sure in case if somebody hacked my webserver I don't want them to do something too horrible, so the web user is not allowed to sudo

Issue in connecting Java thin driver in oracle 11G r2

我们两清 提交于 2019-12-10 14:58:08
问题 public static Connection getConnection()throws SQLException,ClassNotFoundException { String username="scott"; String password="tiger"; String url="jdbc:oracle:thin:@localhost:1521"; Connection connection = null; System.out.println("before class"); Class.forName("oracle.jdbc.OracleDriver"); System.out.println("Before connection"); connection=DriverManager.getConnection(url,username,password); System.out.println("CONNECTED"); return connection; } Connection Name: orcl UserName:scott Password

How to run cucumber selenium using Thin server instead of default Webrick?

别来无恙 提交于 2019-12-10 13:11:38
问题 my cucumber features with selenium runs (for Rails 3 app) using the default Webrick server. How can I force or setup to run with Thin server instead of Webrick? Any settings to put in env.rb file or else? 回答1: Two ways: 1) turn off capybara's built in server and run it yourself. 2) Looks like someone patched in the capability here https://github.com/jnicklas/capybara/pull/175 回答2: This is the new way to do this with recent capybara require "rack/handler/unicorn" Capybara.register_server(

Thin/eventmachine non-root installation problem

杀马特。学长 韩版系。学妹 提交于 2019-12-10 12:24:21
问题 Trying to run ruby on rails framework under nginx+thin, currently working under WEBrick. I don't have root access, cause it is hosted at web hosting service. Till this moment all problems with gems solved w/o root access. thin requires eventmachine, so: $ gem install eventmachine Building native extensions. This could take a while... ERROR: Error installing eventmachine: ERROR: Failed to build gem native extension. /usr/local/bin/ruby18 extconf.rb checking for rb_trap_immediate in ruby.h

Setting up thinking sphinx after server reboot (Rails project)

为君一笑 提交于 2019-12-10 12:16:33
问题 Problem: I am trying to get sphinx running again after server reboot. There seems to be no sphinx.conf file when I try to start it running: >searchd Sphinx 2.0.4-release (r3135) Copyright (c) 2001-2012, Andrew Aksyonoff Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com) FATAL: no readable config file (looked in /etc/sphinxsearch/sphinx.conf, ./sphinx.conf). I have run: rake thinking_sphinx:configure rake thinking_sphinx:index rake thinking_sphinx:start The problem is

For Ruby on Rails, when using Webrick, does it support concurrent requests and Keep-Alive, and why was loading .js and .png files so slow?

为君一笑 提交于 2019-12-09 22:35:17
问题 I am running Rails 3.0.5, and a page is reported on the console that it take 60ms, but if I check the Firefox Net load time chart, it takes 2.9 seconds. If I run the ab command on Bash, it says it take 300ms. So if remove the stand javascripts (6 of them), then it takes 1.9 seconds... but I wonder why so slow? Isn't keep-alive honored? Also strange is Firefox shows that 4 files are downloading concurrently -- I thought Webrick supports only 1 connection as a time? (Will changing to using