1
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:68: warning: already initialized constant Win32::WCHAR
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:68: warning: previous definition of WCHAR was here
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:69: warning: already initialized constant Win32::WCHAR_NUL
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:69: warning: previous definition of WCHAR_NUL was here
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:70: warning: already initialized constant Win32::WCHAR_CR
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:70: warning: previous definition of WCHAR_CR was here
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:71: warning: already initialized constant Win32::WCHAR_SIZE
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:71: warning: previous definition of WCHAR_SIZE was here

I ran the command C:/RailsInstaller/Ruby2.3.3/bin/bundle update

Backtrace:

ArgumentError: unknown encoding name - CP720
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:72:in `find'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:72:in `<module:Win32>'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:4:in `<top (required)>'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/resolv.rb:7:in `<top (required)>'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/resolv.rb:172:in `<class:Hosts>'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/resolv.rb:169:in `<class:Resolv>'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/resolv.rb:39:in `<top (required)>'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/remote_fetcher.rb:7:in `<top (required)>'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/spec_fetcher.rb:2:in `<top (required)>'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/dependency_installer.rb:6:in `<top (required)>'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/installer.rb:3:in `<top (required)>'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/cli/update.rb:50:in `run'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/cli.rb:231:in `update'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/cli.rb:22:in `dispatch'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/cli.rb:13:in `start'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/exe/bundle:30:in `block in <top (required)>'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/exe/bundle:22:in `<top (required)>'
  C:/RailsInstaller/Ruby2.3.3/bin/bundle:22:in `load'
  C:/RailsInstaller/Ruby2.3.3/bin/bundle:22:in `<main>'

Environment

Bundler   1.15.3
Rubygems  2.5.2
Ruby      2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]
GEM_HOME  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0
GEM_PATH  C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0;C:/Users/User/.gem/ruby/2.3.0
Git       2.28.0.windows.1
Platform  x86-mingw32
OpenSSL   OpenSSL 1.0.2j  26 Sep 2016

Gemfile:

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.3'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  # Adds support for Capybara system testing and selenium driver
  gem 'capybara', '~> 2.13'
  gem 'selenium-webdriver'
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'web-console', '>= 3.3.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Holger Just
  • 52,918
  • 14
  • 115
  • 123

1 Answers1

2

I've never ran into this problem but it seems like this is related to your terminal's codepage.

Running the command chcp 1252 through your terminal should fix this issue. Let me note that this will not change the Codepage globally for all your terminals, it's only for the current one. Please refer to this post for more info.

vmank
  • 773
  • 2
  • 7
  • 22