Я пытаюсь установить Gem Capistrano локально, но я получаю следующую ошибку при обновлении проекта Rails с Rails 4 до Rails 5.
Вот информация:
Версия Ruby:
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17]
Gemfile:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '5.2.3'
...
group :development, :test do
gem 'capistrano', '~> 3.1'
gem 'capistrano-rails', '~> 1.1', :require => false
gem 'capistrano-rvm', :require => false
gem 'capistrano-bundler', :require => false
gem 'capistrano-thin', :require => false, :github => 'freego/capistrano-thin'
gem 'capistrano-sidekiq', github: 'seuros/capistrano-sidekiq'
end
Когда я пытаюсь bundle install
всех драгоценных камней, я нахожу следующую ошибку:
Traceback (most recent call last):
2: from ./bin/bundle:3:in `<main>'
1: from /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems.rb:263:in `bin_path'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': Could not find 'bundler' (1.14.3) required by your /Users/albert/localDocuments/CodingArea/Clients/hanspeter/book/Gemfile.lock. (Gem::GemNotFoundException)
To update to the lastest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.14.3`
Если я пытаюсь обновить мойВ пакете gem, как предлагается, я нахожу следующую ошибку:
bundle update --bundler [2.5.0]
Your Gemfile lists the gem annotate (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once (per group).
While it's not a problem now, it could cause errors if you change the version of one of them later.
Fetching https://github.com/freego/capistrano-thin.git
Fetching https://github.com/seuros/capistrano-sidekiq.git
Fetching gem metadata from https://rails-assets.org/...
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rubygems.org/..
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies....
Bundler could not find compatible versions for gem "capistrano":
In snapshot (Gemfile.lock):
capistrano (= 3.4.0)
In Gemfile:
capistrano-bundler was resolved to 1.1.4, which depends on
capistrano (~> 3.1)
capistrano-rvm was resolved to 0.1.2, which depends on
capistrano (~> 3.0)
capistrano-sidekiq was resolved to 1.0.2, which depends on
capistrano (>= 3.9.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
В моем Gemfile.lock у меня есть следующая соответствующая информация:
cancancan (1.13.1)
capistrano (3.4.0)
i18n
rake (>= 10.0.0)
sshkit (~> 1.3)
capistrano-bundler (1.1.4)
capistrano (~> 3.1)
sshkit (~> 1.2)
capistrano-rails (1.1.6)
capistrano (~> 3.1)
capistrano-bundler (~> 1.1)
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
carrierwave (0.10.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
В конце написаноfile:
BUNDLED WITH
1.14.3
С другой стороны, если я перечислю свои локальные драгоценные камни, у меня будет следующая версия bundler:
gem list
Версия Bundler:
bundler (2.0.1)
Я думаю, потому что bundle install
еще не работает, Gemfile.lock не обновляется.
В моих локальных драгоценных камнях я не вижу камень capistrano
.
Когда япопробуйте установить гем capistrano
, происходит следующее:
gem install capistrano --verbose [2.5.0]
Getting SRV record failed: DNS result has no information for _rubygems._tcp.gems.rubyforge.org
HEAD http://gems.rubyforge.org/api/v1/dependencies
301 Moved Permanently
HEAD https://rubygems.org
200 OK
Getting SRV record failed: DNS result has no information for _rubygems._tcp.gems.github.com
HEAD http://gems.github.com/api/v1/dependencies
301 Moved Permanently
HEAD http://gems.github.io/api/v1/dependencies
404 Not Found
GET http://gems.github.com/prerelease_specs.4.8.gz
301 Moved Permanently
GET http://gems.github.io/prerelease_specs.4.8.gz
404 Not Found
GET http://gems.github.com/specs.4.8.gz
301 Moved Permanently
GET http://gems.github.io/specs.4.8.gz
404 Not Found
HEAD https://api.rubygems.org/api/v1/dependencies
200 OK
GET https://rubygems.org?gems=capistrano
200 OK
ERROR: While executing gem ... (TypeError)
incompatible marshal file format (can't be read)
format version 4.8 required; 60.33 given
Видимо, он найден в URL https://rubygems.org?gems=capistrano
.Но тогда приходит эта ошибка файла маршалаЯ не знаю, как это отладить.
В режиме отладки я получаю следующую информацию:
NOTE: Debugging mode prints all exceptions even when rescued
Exception `LoadError' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/resolv.rb:170 - LoadError
Exception `Resolv::DNS::Config::NXDomain' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/resolv.rb:546 - _rubygems._tcp.gems.rubyforge.org
Exception `Resolv::DNS::Config::NXDomain' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/resolv.rb:546 - _rubygems._tcp.gems.rubyforge.org.local
Exception `Resolv::ResolvError' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/resolv.rb:491 - DNS result has no information for _rubygems._tcp.gems.rubyforge.org
Exception `Resolv::ResolvError' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/resolv.rb:491 - DNS result has no information for _rubygems._tcp.gems.github.com
Exception `Gem::RemoteFetcher::FetchError' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:274 - bad response Not Found 404 (http://gems.github.io/api/v1/dependencies)
Exception `Gem::RemoteFetcher::FetchError' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:304 - bad response Not Found 404 (http://gems.github.io/api/v1/dependencies)
Exception `Errno::EEXIST' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:232 - File exists @ dir_s_mkdir - /Users/albert/.gem/specs/gems.github.com%80
Exception `Gem::RemoteFetcher::FetchError' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:274 - bad response Not Found 404 (http://gems.github.io/prerelease_specs.4.8.gz)
Exception `Gem::RemoteFetcher::FetchError' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:304 - bad response Not Found 404 (http://gems.github.io/prerelease_specs.4.8.gz)
Exception `Errno::EEXIST' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/fileutils.rb:232 - File exists @ dir_s_mkdir - /Users/albert/.gem/specs/gems.github.com%80
Exception `Gem::RemoteFetcher::FetchError' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:274 - bad response Not Found 404 (http://gems.github.io/specs.4.8.gz)
Exception `Gem::RemoteFetcher::FetchError' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:304 - bad response Not Found 404 (http://gems.github.io/specs.4.8.gz)
Exception `Gem::RemoteFetcher::FetchError' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/spec_fetcher.rb:269 - bad response Not Found 404 (http://gems.github.io/specs.4.8.gz)
Exception `TypeError' at /Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/resolver/api_set.rb:118 - incompatible marshal file format (can't be read)
format version 4.8 required; 60.33 given
ERROR: While executing gem ... (TypeError)
incompatible marshal file format (can't be read)
format version 4.8 required; 60.33 given
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/resolver/api_set.rb:118:in `load'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/resolver/api_set.rb:118:in `versions'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/resolver/api_set.rb:55:in `find_all'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/resolver/composed_set.rb:55:in `block in find_all'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/resolver/composed_set.rb:54:in `map'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/resolver/composed_set.rb:54:in `find_all'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/resolver/best_set.rb:31:in `find_all'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/resolver/installer_set.rb:155:in `find_all'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/resolver/installer_set.rb:56:in `add_always_install'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/dependency_installer.rb:478:in `resolve_dependencies'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/commands/install_command.rb:194:in `install_gem'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/commands/install_command.rb:255:in `block in install_gems'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/commands/install_command.rb:251:in `each'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/commands/install_command.rb:251:in `install_gems'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/commands/install_command.rb:158:in `execute'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/command.rb:313:in `invoke_with_build_args'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/command_manager.rb:171:in `process_args'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/command_manager.rb:141:in `run'
/Users/albert/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/gem_runner.rb:59:in `run'
/Users/albert/.rbenv/versions/2.5.0/bin/gem:21:in `<main>'
Мои источники драгоценных камней:
*** CURRENT SOURCES ***
http://gems.rubyforge.org/
http://gems.github.com
https://rubygems.org/
Можеткто-нибудь поможет мне найти проблему и установить Capistrano?