如果我运行 rails s
/Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require : cannot load such file -- net/ssh/authentication/agent/socket (LoadError)
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `block in require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.5.0/lib/net/ssh/authentication/agent.rb:22:in `<top (required)>
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `block in require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.5.0/lib/net/ssh/authentication/key_manager.rb:4:in `<top (required)>
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `block in require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.5.0/lib/net/ssh/authentication/session.rb:4:in `<top (required)>
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `block in require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.5.0/lib/net/ssh.rb:11:in `<top (required)>
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `block in require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-gateway-1.1.0/lib/net/ssh/gateway.rb:2:in `<top (required)>
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `block in require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.12.0/lib/capistrano/configuration/connections.rb:2:in `<top (required)>
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `block in require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.12.0/lib/capistrano/configuration.rb:5:in `<top (required)>
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `block in require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.12.0/lib/capistrano.rb:3:in `<top (required)>
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in `each
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in `block in require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `each
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.3/lib/bundler.rb:119:in `require
from /Users/frankie/projects/unitedfreelance/config/application.rb:13:in `<top (required)>
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/commands.rb:53:in `require
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/commands.rb:53:in `block in <top (required)>
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/commands.rb:50:in `tap
from /Users/frankie/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/commands.rb:50:in `<top (required)>
from script/rails:6:in `require
from script/rails:6:in `<main>
< 强 > Gemfile 强 >
source http://rubygems.org
gem rails , 3.2.0
# Bundle edge Rails instead:
# gem rails , :git => git://github.com/rails/rails.git
gem pg
gem "cocoon"
gem nokogiri
gem hpricot
gem "formtastic", "~> 2.1.1"
gem "activeadmin", "~> 0.4.4"
gem omniauth
gem country-select
gem "paperclip", "~> 3.0"
gem cancan
gem rolify
gem "meta_search", >= 1.1.0.pre
gem bourbon , "~> 2.0.0.rc1"
gem "rails-boilerplate"
gem geocoder
gem httparty
gem hashie
gem will_paginate , :git => "git://github.com/mislav/will_paginate.git"
gem thinking-sphinx , 2.0.10
gem sanitize
gem feedzirra
gem "crypt19", "~> 1.2.1"
gem wicked_pdf
gem forem , :git => "git://github.com/radar/forem.git"
gem thin
gem whenever , :require => false
gem "ckeditor", "3.7.1"
# gem sisow
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem sass-rails , ~> 3.2.3
gem coffee-rails , ~> 3.2.1
gem uglifier , >= 1.0.3
end
gem haml-rails
gem jquery-rails
group :development do
gem ruby_parser
end
# To use ActiveModel has_secure_password
# gem bcrypt-ruby , ~> 3.0.0
# Use unicorn as the web server
gem unicorn
# Deploy with Capistrano
gem capistrano
# To use debugger
# gem ruby-debug19 , :require => ruby-debug
一秒钟它工作, 下一秒它没有。
I stopped working after I tried to fix the CKeditor integration following this guide: https://github.com/galetahub/ckeditor
<强 > 更新 强 >
发生这一错误是因为我使用Capistrano, 宝石需要 net- ssh
。 net- ssh
宝石是从2.4 - & gt; 2. 5. 0上更新的,导致问题。
更新我的Gemfile:
gem rails , 3.2.0
gem "net-ssh", "~> 2.4.0"
然后运行 $$ 宝石更新 net-ssh
铁路命令的错误已经消失。 还没有使用 Capistrano 来进行部署, 所以无法说明是否使用部署出现错误 。
<强 > 更新2 强 >
Capistrano 无法部署, 因而混乱了 。 使用 < code> cap 部署 code > 时, 我收到您在文章开头看到的错误信息 。
<强 > 更新3 强 >
Upgraded net-ssh
to 2.5.1
because in the comments someone mentioned 2.5.0
was broken.
After the upgrade the require issue was solved, however, Capistrano still will not deploy.
[deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: 85.xxx.xxx.xxx (NameError: uninitialized constant Net::SSH::KnownHosts::SUPPORTED_TYPE)
connection failed for: 85.xxx.xxx.xxx (NameError: uninitialized constant Net::SSH::KnownHosts::SUPPORTED_TYPE)
<强>更新4(加工作变通) 强>
在下文的评论中张贴了一个变通办法。
- Keep your net-ssh version on 2.5.1
- Before you deploy with Capistrano, delete the line with your server from the ~/.ssh/known_hosts file
- You can now deploy once. Repeat before every deploy.