簡體   English   中英

無法運行rails服務器:`require':無法加載此類文件--net / ssh(LoadError)

[英]Unable to run rails server: `require': cannot load such file — net/ssh (LoadError)

我正在嘗試使用michael hartl指南在軌道上學習紅寶石。 在過去,我能夠完成新的rails webapp的設置。 現在,當我嘗試運行服務器時,我收到此錯誤:

/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>'

或者,將其添加到您的Gemfile:

gem 'fog', '~> 1.36.0'

並運行bundle install 這對我1.35.0 ,因為我遇到了1.35.0引入的錯誤: https//github.com/fog/fog/issues/3765

將其添加到您的Gemfile:

gem 'net-ssh'

然后運行bundle install

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM