thin

Help with starting up my thin server with Sinatra

Hi All, I'm a newcomer trying to get my feet wet with Ruby and Sinatra. I followed the Slicehost articles in getting Ruby 1.9.1 setup along with Thin 1.2.7 with a reverse proxy to Nginx. Most things were going pretty smooth until I tried to start up my thin server. This is the output I get from my logs: $ sudo thin -C config.yml -R c...

Weird problems with ruby servers on Ubuntu 9.10

So I'm using Ubuntu 9.10, trying to setup and deploy my app, but for some reason, whenever I try and boot up thin, it tells me it can't find rails, script/console, however, works fine. Heck, even script/server works fine as long as I don't try and daemonize it, then it just fails without any errors. Any ideas on what the hell is going on...

Issues finding gems installed in my home directory during runtime

I'm on a shared host (yes, non ideal...but cheap!) and setting up gems for my rails app, and can't figure out why the gems are unavailable from ruby scripts (probably doing something stupid!) Env. variables: GEM_PATH = /home/myhome/ruby/gems:/usr/local/lib/ruby/gems/1.9.1/ GEM_HOME = /home/myhome/ruby/gems PATH = /usr/local/bin:/bin:/us...

Thin and Bundler on Windows Rails

Trying to get Thin working with Bundle on Windows, I know, major PITA but anyways, I'm new to Thin and Bundle gem, I'm on Ruby 1.8.6 and Rails 2.3.5 and trying to get someone else's app running on my laptop, the app uses Thin and Bundle gem to install gems required. I noticed that bundle created a .bundle folder under My Documents folder...

intelligent thin start with port alias for bash

i would like a single alias (ts) which starts my local development server. the script should test for an open port starting at 3000 and use the first available port. additionally, some sites require a rackup file, making -R config.ru necessary. this script should check the current directory for the config.ru file and add that to the alia...

how to specify query string in url with apache bench

hi, My rails application is running on thin server which i want to benchmark using apachebench the command am using is ab -n 1 -c 1 http://localhost:3001/welcome/search?query="doctor"&rad=5 But thin server is not taking this url.Its giving !! Invalid Request Can any one help me how to give the url such that thin accepts th...

What is causing Apache2 to display PHP as plain text in this config file?

I am trying to run PHP and Rails in the same virtual host, however, PHP is being displayed as plain/text. When I create a test host without all the rewrites and proxy-ing, Apache2 will process the PHP as desired. Where in my config file have I gone wrong? <VirtualHost *:80> #ServerName staging.domain.com #ServerAlias www.domain.com ...

using thin for long-polling connection

since it's threadless, would the ruby-based thin be okay? ...

RVM and thin, root vs. local user

So I'm trying to get thin to run as a service with RVM. After a thin install I manually updated /etc/init.d/thin to use an su - user when running the config command so that thin was running as a local user, rather than root. So far so good. Now, when I try to sudo service thin start it looks like it's trying to use the non-RVM version o...

Getting async http requests to work on rails 3beta4/ruby 1.9.2-rc2/thin/eventmachine

I've been trying to get basic async HTTP calls to work in my app. I've tried using some code in my app from the Rails 3 async stack demo: http://github.com/igrigorik/async-rails, but I'm getting "can't yield from root fiber" and I have no idea where to go from here. Here's the top of my trace: (eval):10:in `yield' (eval):10:in `get' a...

Reset cache in Thin instances launched by Unicorn

I have a Ruby webapp that caches some frequently used information in a lightweight layer, but there are times at which I want to reset the cache without restarting the entire process. Before I started using Unicorn, I had a known list of ports that I could send a special HTTP request to reset the cache on each instance. However, under U...

Varnish + Rails causes invalid authenticity tokens in development

Here is my situation. I am testing out Varnish on my local box (I'm doing some stuff related to page caching that would be a big pain to push to staging every time). Everything works fine, except whenever I submit a form, I get an ActionController::InvalidAuthenticityToken exception. Varnish is running on localhost at port 6081, and Thi...

how to implement thin client app with pyqt

Here is what I would like to do, and I want to know how some people with experience in this field do this: With three POST requests I get from the http server: widgets and layout and then app logic (minimal) data Or maybe it's better to combine the first two or all three. I'm thinking of using pyqt. I think I can load .ui files. I c...

Thin behind Nginx "no live upstreams while connecting to upstream"

I am getting this error in maybe one out of 50-100 requests. I am running 10 Thin instances behind nginx and I don't think that my load is high enough to max out the usage in all 10 instances.. and I would expect nginx to wait even if all instances were busy (maybe not??). Has anyone else seen this before? I am trying to figure out a ...

Cannot install thin on windows

Hi guys, 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: ER...

Distinguishing between nginx and thin

This is a newbie question around nginx and thin in the rails environment. In reading/learning on rails I frequently hear about nginx and thin being a great combination for a rails site. In reading the descriptions of each, they both describe themselves as web servers, so I'm a little confused at what the combination brings to the tabl...

Web Safe Font Weights -- How to get thinner?

When I design in Photoshop, my fonts are thin and crisp, but when I declare fonts in CSS -- even when using font-weight: lighter -- the fonts always appear bolder. Maybe this is just how the browser renders the font (In IE fonts stay thin), but I was wondering if there were any tricks or tips for achieving the same thin, crisp looks. ...

Asynchronously iterating over the response of a request using Thin and Sinatra

If your response in Sinatra returns an 'eachable' object, Sinatra's event loop will 'each' your result and yield the results in a streaming fashion as the HTTP response. However, if there are concurrent requests to Sinatra, it will iterate through all the elements of one response before handling another request. If we have a cursor to ...

Rails 2.3.8 with thin doesn't work after installing rails 3.0.1

Hello, I have several Rails applications with version 2.3.8, which I run using the thin server. I want to install Rails 3.0.1 on the same machine for testing purposes. The installation worked fine, but after installing Rails 3.0.1, running Rails 2.3.8 applications with thin fails with this error: >> Using rails adapter Missing the Rai...

WEBrick alterative for Rails 2.3.8?

I'm a Rails newbie, and I was initially using NetBeans + JRuby to make Rails apps (was using JRuby because it was a quick start - I don't need to interface with any Java libs). Then because of (a) many gems are not available for JRuby, and (b) most of the Rails webshosts don't support JRuby, I decided to use Ruby MRI. So I got everythi...