---
title: "rvm，使用thin"
author: "keating"
date: "2012-04-24T12:19:14Z"
tags: []
categories: ["编程语言"]
slug: "rvm-thin"
draft: false
lastmod: "2012-04-24T22:18:09Z"
id: 1490158
url: "https://keating.iteye.com/blog/1490158"
---

**1**.使用rvm，安装gem，不要sudo gem install ...要用rvmsudo代替，

```shell
rvmsudo gem intall thin
```

**2**.thin不需要rvm wrapper生成一个脚本

**3**.可以使用which thin查看thin是否安装在了正确的gemset

运行thin，若出现“bundler/setup”无法找到的类似错误，可以参考以上三条

若出现下面的错误，

> undefined methodassociate_callback_target' for #<Thin::Connection:0xa3402c8> (NoMethodError)

**4**.则需要重新安装一下eventmachine，[>>猛击这里<<](https://thin.lighthouseapp.com/projects/7212/tickets/134-thin-crashes-when-connecting-with-eventmachine-01210)

```shell
gem uninstall eventmachine
gem install eventmachine
```

卸载gem时，若提示没有安装该gem，但gem list明明显示已经安装了，那么应该是安装在了global gemset下，去那里卸载

**5**.若出现错误

> thin-1.3.1/lib/rack/adapter/loader.rb:36:in `eval'

则说明使用了不正确的rack版本，可能是安装rails3.2时顺带装上了rack-1.4.1，而thin-1.3.1需要rack-1.3.6