从Ubuntu上的Rails控制器'没有这样的文件要加载-net/ssh' [英] 'no such file to load -- net/ssh' from rails Controller on Ubuntu
本文介绍了从Ubuntu上的Rails控制器'没有这样的文件要加载-net/ssh'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个非常简单的控制器:
I have a very simple controller:
require 'net/ssh'
class MyController < ApplicationController
def foo
render :text => 'bar'
end
end
但是当我请求 http://server:3000/my/foo 时,我得到:
But when I request http://server:3000/my/foo I get:
MissingSourceFile in MyController#foo
no such file to load -- net/ssh
宝石已安装
> gem list net-ssh
*** LOCAL GEMS ***
net-ssh (2.0.11)
此外,我尝试在IRB中要求使用"net/ssh",并且可以正常工作.
Also, I tried require 'net/ssh' in IRB, and it works.
MyController在Windows上工作正常,但在Ubuntu上失败.
MyController works fine on Windows, but fail on Ubuntu.
有什么问题吗?
推荐答案
这可能会有所帮助:
这也值得一看:
这篇关于从Ubuntu上的Rails控制器'没有这样的文件要加载-net/ssh'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文