ruby-on-railsubuntu-8.04net-ssh

'no such file to load -- net/ssh' from rails Controller on Ubuntu


I have a very simple controller:

require 'net/ssh'

class MyController < ApplicationController
    def foo
        render :text => 'bar'
    end
end

But when I request http://server:3000/my/foo I get:

MissingSourceFile in MyController#foo 
no such file to load -- net/ssh

The gem is installed

> gem list net-ssh

*** LOCAL GEMS ***
net-ssh (2.0.11)

Also, I tried require 'net/ssh' in IRB, and it works.

MyController works fine on Windows, but fail on Ubuntu.

What can be wrong?


Solution

  • This may help:

    Rails Gem Dependencies and Plugin Errors

    This is also worth watching:

    Railscasts: Gem Dependencies