Ruby:开始瘦:找不到/ home / ubuntu的适配器

时间:2014-01-08 13:46:03

标签: ruby thin

我尝试在Amazon实例上的Ubuntu上安装Image Magically。

我在https://github.com/afeld/magickly处遵循了参考资料。

我按照以下步骤在服务器上安装Image Magically。

$ gem install magickly

之后我使用给定的命令安装了“thin”gem。

$ gem install thin

然后我尝试用以下命令启动thin gem。

$ thin start

但它给了我错误:No adapter found for /home/ubuntu

如何解决这个问题?

4 个答案:

答案 0 :(得分:4)

您必须创建应用程序,方法如下:

创建应用程序目录:

mkdir magickly
cd magickly

使用以下内容创建Gemfile文件:

gem 'magickly'

使用以下内容创建config.ru文件:

require 'magickly'
run Magickly::App

运行bundle install。 现在您可以启动服务器了:

thin start

并访问http://localhost:3000

上的应用

答案 1 :(得分:0)

对于其他发生错误的用户:thin: No adapter found for /home/ubuntu
您可能只是忘记了cd到根文件夹。

答案 2 :(得分:0)

我看到了此错误消息,因为不允许将服务用户Thin配置为使用IsMimeMultipartContent到目录。 Sub TestWithDict() ' Requires that the VBA project has a reference to Microsoft Scripting Runtime; ' choose Tools > References > Microsoft Scripting Runtime Dim myDict As Scripting.Dictionary Dim rngData, rngTarget As Range Dim sRowString, sRowKey As String Dim sArray() As String Dim i, j As Integer Set myDict = New Scripting.Dictionary Set rngData = ActiveSheet.UsedRange ' Loop through the rows: For Each rRow In rngData.Rows ' Build a string from the row: sRowString = rRow.Cells(, 1).Value & ";" & rRow.Cells(, 2).Value & _ ";" & rRow.Cells(, 3).Value ' Use Project and Task to create a key for the dictionary: sRowKey = rRow.Cells(, 1).Value & ";" & rRow.Cells(, 2).Value ' Save the string to the Dictionary: ' 1) If it doesn't already exist, add it: If Not myDict.Exists(sRowKey) Then myDict.Add sRowKey, sRowString ' 2) If it already exists, append the resource from the third column: Else myDict.Item(sRowKey) = myDict.Item(sRowKey) & ";" & rrow.Cells(, 3).Value End If Next rrow ' After completing the For block, the dictionary contains ' four strings representing each row in the desired output. ' Write the strings in the dictionary to the worksheet: Set rngTarget = ActiveSheet.Range("E1") i = 0 For Each sItem In myDict.Items sArray = Split(sItem, ";") Debug.Print sArray(0), sArray(1), sArray(2) For j = 0 To UBound(sArray) rngTarget.Offset(i, j) = sArray(j) Next j i = i + 1 Next sItem End Sub 默默地失败了,然后它抱怨找不到合适的适配器。

答案 3 :(得分:0)

在使用thin start之前,您必须执行thin install