Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/57.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 无法运行rails服务器:`require';:无法加载这样的文件--net/ssh(LoadError)_Ruby On Rails_Terminal_Server_Railstutorial.org - Fatal编程技术网

Ruby on rails 无法运行rails服务器:`require';:无法加载这样的文件--net/ssh(LoadError)

Ruby on rails 无法运行rails服务器:`require';:无法加载这样的文件--net/ssh(LoadError),ruby-on-rails,terminal,server,railstutorial.org,Ruby On Rails,Terminal,Server,Railstutorial.org,我正在尝试使用MichaelHartl指南学习RubyonRails。在过去,我能够完成一个新rails Web应用程序的设置。现在,当我尝试运行服务器时,出现以下错误: /home/ss/.rvm/gems/ruby-2.2.2/gems/fog-1.26.0/lib/fog/joyent/compute.rb:3:in `require': cannot load such file -- net/ssh (LoadError) from /home/ss/.rvm/gems/rub

我正在尝试使用MichaelHartl指南学习RubyonRails。在过去,我能够完成一个新rails Web应用程序的设置。现在,当我尝试运行服务器时,出现以下错误:

/home/ss/.rvm/gems/ruby-2.2.2/gems/fog-1.26.0/lib/fog/joyent/compute.rb:3:in `require': cannot load such file -- net/ssh (LoadError)
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/fog-1.26.0/lib/fog/joyent/compute.rb:3:in `<top (required)>'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/fog-1.26.0/lib/fog/joyent.rb:1:in `require'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/fog-1.26.0/lib/fog/joyent.rb:1:in `<top (required)>'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/fog-1.26.0/lib/fog.rb:41:in `require'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/fog-1.26.0/lib/fog.rb:41:in `<top (required)>'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:3:in `require'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:3:in `<top (required)>'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/carrierwave-0.10.0/lib/carrierwave/storage.rb:9:in `require'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/carrierwave-0.10.0/lib/carrierwave/storage.rb:9:in `<top (required)>'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/carrierwave-0.10.0/lib/carrierwave.rb:78:in `require'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/carrierwave-0.10.0/lib/carrierwave.rb:78:in `<top (required)>'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
    from /home/ss/workspace/hartl/sample_app/config/application.rb:7:in `<top (required)>'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `require'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `block in server'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `tap'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `server'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/railties-4.2.2/lib/rails/commands.rb:17:in `<top (required)>'
    from /home/ss/workspace/hartl/sample_app/bin/rails:10:in `require'
    from /home/ss/workspace/hartl/sample_app/bin/rails:10:in `<top (required)>'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
    from /home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
    from /home/ss/workspace/hartl/sample_app/bin/spring:13:in `require'
    from /home/ss/workspace/hartl/sample_app/bin/spring:13:in `<top (required)>'
    from bin/rails:4:in `load'
    from bin/rails:4:in `<main>'
/home/ss/.rvm/gems/ruby-2.2.2/gems/fog-1.26.0/lib/fog/joyent/compute.rb:3:在'require'中:无法加载这样的文件--net/ssh(LoadError)
from/home/ss/.rvm/gems/ruby-2.2.2/gems/fog-1.26.0/lib/fog/joyent/compute.rb:3:in`'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/fog-1.26.0/lib/fog/joyent.rb:1:in'require'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/fog-1.26.0/lib/fog/joyent.rb:1:in`'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/fog-1.26.0/lib/fog.rb:41:in'require'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/fog-1.26.0/lib/fog.rb:41:in`'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:3:in'require'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:3:in`'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/carrierwave-0.10.0/lib/carrierwave/storage.rb:9:in'require'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/carrierwave-0.10.0/lib/carrierwave/storage.rb:9:in`'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/carrierwave-0.10.0/lib/carrierwave.rb:78:in'require'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/carrierwave-0.10.0/lib/carrierwave.rb:78:in`'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in'require'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:在“请求中的块(2个级别)”中
from/home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in'each'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in'block in require'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in'each'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in'require'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler.rb:134:in'require'
from/home/ss/workspace/hartl/sample\u app/config/application.rb:7:in`'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/railties-4.2.2/lib/rails/commands/commands\u tasks.rb:78:in'require'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/railties-4.2.2/lib/rails/commands/commands\u tasks.rb:78:在“服务器中的块”中
from/home/ss/.rvm/gems/ruby-2.2.2/gems/railties-4.2.2/lib/rails/commands/commands\u tasks.rb:75:in'tap'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/railties-4.2.2/lib/rails/commands/commands\u tasks.rb:75:在“服务器”中
from/home/ss/.rvm/gems/ruby-2.2.2/gems/railties-4.2.2/lib/rails/commands/commands\u tasks.rb:39:in“run\u command!”
from/home/ss/.rvm/gems/ruby-2.2.2/gems/railties-4.2.2/lib/rails/commands.rb:17:in`'
from/home/ss/workspace/hartl/sample_app/bin/rails:10:in'require'
from/home/ss/workspace/hartl/sample\u app/bin/rails:10:in`'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in'load'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in'call'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/lib/spring/client/command.rb:7:in'call'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/lib/spring/client.rb:26:in'run'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/bin/spring:48:in`'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/lib/spring/binstub.rb:11:in'load'
from/home/ss/.rvm/gems/ruby-2.2.2/gems/spring-1.1.3/lib/spring/binstub.rb:11:in`'
from/home/ss/workspace/hartl/sample_app/bin/spring:13:in'require'
from/home/ss/workspace/hartl/sample\u app/bin/spring:13:in`'
来自料仓/轨道:4:在“装载”中
从箱子/轨道:4:in`'

将此项添加到您的GEM文件中:

gem 'net-ssh'
gem 'fog', '~> 1.36.0'

然后运行
bundle install

或者,将此添加到您的GEM文件中:

gem 'net-ssh'
gem 'fog', '~> 1.36.0'

然后运行
捆绑安装
。这对我来说很有效,因为我遇到了
1.35.0
中引入的一个bug:

嗨,Shenil,我对ruby了解不多,但你的问题格式不太好,请参见。这可能会增加你从认识ruby的人那里得到帮助的机会