oneclick / rubyinstaller2 Goto Github PK
View Code? Open in Web Editor NEWMSYS2 based RubyInstaller for Windows
Home Page: https://rubyinstaller.org
License: BSD 3-Clause "New" or "Revised" License
MSYS2 based RubyInstaller for Windows
Home Page: https://rubyinstaller.org
License: BSD 3-Clause "New" or "Revised" License
There are certain gems, e.g. bson-ruby which fail to build on Ruby 2.3 without MSYS2.
It would be nice to switch the Ruby 2.3 build to use rubyinstaller2 if possible.
Nokogiri provides a source gem (platform ruby
) and a gem for the x64-mingw32
platform. The latter one is restricted to ruby versions 2.1 to 2.3, but the source gem has no ruby version restriction.
C:\Users\lars\railstest>ruby --version
ruby 2.4.0p0 (2016-12-24 revision 57164) [x64-mingw32]
C:\Users\lars\railstest>bundle --version
Bundler version 1.13.7
C:\Users\lars\railstest>gem list nokogiri
*** LOCAL GEMS ***
nokogiri (1.7.0.1)
C:\Users\lars\railstest>gem list -r nokogiri
*** REMOTE GEMS ***
nokogiri (1.7.0.1 ruby java x64-mingw32 x86-mingw32, 1.6.1 x86-mswin32-60, 1.4.4.1 x86-mswin32)
C:\Users\lars\railstest>rm Gemfile.lock
C:\Users\lars\railstest>bundle
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies.............................................
nokogiri-1.7.0.1-x64-mingw32 requires ruby version < 2.4, which is incompatible
with the current version, ruby 2.4.0p0
I would expect, that bundler chooses the gem for platform 'ruby' as the alternative without this ruby version constraint, but it refuses install altogether.
The only workaround I could find so far, is to install all dependent gems by gem install
and run bundle install --local
to generate the Gemfile.lock
.
In the case that MSYS2 is required (for gem install
, rubydevkit
command, etc) we only print a short download advice , currently. The user needs to do the MSYS2 download and proper pacman
runs by hand.
Maybe we could:
gem install
)This project is for Ruby version 2.4 and newer.
For Ruby versions < 2.4 please file an issue here.
Can't set " gem install sqlite3 --platform ruby "
C:\Sites>ridk exec pacman -S mingw-w64-x86_64-sqlite3
warning: mingw-w64-x86_64-sqlite3-3.18.0-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) mingw-w64-x86_64-sqlite3-3.18.0-1
Total Installed Size: 5.45 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [#######################################] 100%
(1/1) checking package integrity [#######################################] 100%
(1/1) loading package files [#######################################] 100%
(1/1) checking for file conflicts [#######################################] 100%
(1/1) checking available disk space [#######################################] 100%
:: Processing package changes...
(1/1) reinstalling mingw-w64-x86_64-sqlite3 [#######################################] 100%
----------------------------------------------------------------------------------------
C:\Sites> gem install sqlite3 --platform ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
current directory: C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.13/ext/sqlite3
C:/RailsInstaller/Ruby2.3.0/bin/ruby.exe -r ./siteconf20170609-17172-17pg85l.rb extconf.rb
checking for sqlite3.h... yes
checking for pthread_create() in -lpthread... no
checking for sqlite3_libversion_number() in -lsqlite3... no
sqlite3 is missing. Install SQLite3 from http://www.sqlite.org/ first.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/RailsInstaller/Ruby2.3.0/bin/$(RUBY_BASE_NAME)
--with-sqlite3-config
--without-sqlite3-config
--with-pkg-config
--without-pkg-config
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
--with-pthreadlib
--without-pthreadlib
--with-sqlite3lib
--without-sqlite3lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sqlite3-1.3.13/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.13 for inspection.
Results logged to C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sqlite3-1.3.13/gem_make.out
C:\Sites>
ridk version
?C:\WINDOWS\system32>cd C:\Ruby24-x64
C:\Ruby24-x64>ridk version
---
ruby:
path: C:/Ruby24-x64
version: 2.4.1
platform: x64-mingw32
ruby_installer:
package_version: 2.4.1-1
git_commit: 6635d31
msys2:
path: C:\msys64
title: MSYS2 64bit
version: '20161025'
cc: x86_64-w64-mingw32-gcc (Rev3, Built by MSYS2 project) 6.3.0
sh: GNU bash, version 4.3.46(2)-release (x86_64-pc-msys)
Paperclip requires file
to content-type checks.
With RubyInstaller 1.x
, we used to get this with devkit
, which was included in the PATH
:
But as RubyInstaller 2.x
doesn't give file
in cmd
shell (it exists in msys64
), what is the recommended way to get it working? Since it's required at runtime, Windows needs direct access to the binaries.
I have got it working by copying file
to a folder & adding to PATH, but defeats purpose of msys2
.
I cannot install the MINGW development toolchain using ridk
. (I assume I need both MSYS2 and MINGW?)
Which components shall be installed? If unsure press ENTER [1,2,3] 3
MSYS2 seems to be unavailable
Download http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20161025.exe
to C:\Users\agross\AppData\Local\Temp/msys2-x86_64-20161025.exe
Downloading msys2-x86_64-20161025.exe (100%)
Verify integrity of msys2-x86_64-20161025.exe ... OK
Run the MSYS2 installer ...
> C:\Users\agross\AppData\Local\Temp/msys2-x86_64-20161025.exe
Success
Install MSYS2 and MINGW development toolchain ...
> pacman -S --needed --noconfirm autoconf autoconf2.13 autogen automake-wrapper automake1.10 automake1.11 automake1.12 automake1.13 automake1.14 automake1.15 automake1.6 automake1.7 automake1.8 automake1.9 diffutils file gawk grep libtool m4 make patch pkg-config sed texinfo texinfo-tex wget mingw-w64-x86_64-binutils mingw-w64-x86_64-crt-git mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-headers-git mingw-w64-x86_64-libmangle-git mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-tools-git mingw-w64-x86_64-winpthreads-git mingw-w64-x86_64-winstorecompat-git
warning: file-5.28-2 is up to date -- skipping
warning: gawk-4.1.4-1 is up to date -- skipping
warning: grep-2.26-1 is up to date -- skipping
warning: m4-1.4.17-4 is up to date -- skipping
warning: sed-4.2.2-2 is up to date -- skipping
warning: wget-1.18-1 is up to date -- skipping
error: target not found: mingw-w64-x86_64-winstorecompat-git
Install MSYS2 and MINGW development toolchain failed
Installation failed: pacman failed
However, I was able complete the installation by running pacman
with the package list above minus mingw-w64-x86_64-winstorecompat-git
.
ridk version
?$ ridk version
---
ruby:
path: C:/Ruby
version: 2.4.1
platform: x64-mingw32
ruby_installer:
package_version: 2.4.1-2
git_commit: a2667ee
msys2:
path: C:\Ruby\sdk
title: MSYS2 64bit
version: '20161025'
cc: x86_64-w64-mingw32-gcc (Rev2, Built by MSYS2 project) 6.2.0
sh: GNU bash, version 4.3.46(2)-release (x86_64-pc-msys)
C:\>gem update openssl
Updating installed gems
Updating openssl
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing openssl:
ERROR: Failed to build gem native extension.
current directory: C:/bin/ruby/lib/ruby/gems/2.4.0/gems/openssl-2.0.4/ext/openssl
C:/bin/ruby/bin/ruby.exe -r ./siteconf20170626-6764-ht24i.rb extconf.rb
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for -lgdi32... yes
checking for -lcrypt32... yes
checking for openssl/ssl.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/bin/ruby/bin/$(RUBY_BASE_NAME)
--with-openssl-dir
--without-openssl-dir
--with-openssl-include
--without-openssl-include=${openssl-dir}/include
--with-openssl-lib
--without-openssl-lib=${openssl-dir}/lib
--with-kerberos-dir
--without-kerberos-dir
--with-kerberos-include
--without-kerberos-include=${kerberos-dir}/include
--with-kerberos-lib
--without-kerberos-lib=${kerberos-dir}/lib
--with-debug
--without-debug
--enable-debug
--disable-debug
--with-nsllib
--without-nsllib
--with-socketlib
--without-socketlib
--with-openssl-config
--without-openssl-config
--with-pkg-config
--without-pkg-config
--with-gdi32lib
--without-gdi32lib
--with-crypt32lib
--without-crypt32lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/bin/ruby/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/openssl-2.0.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/bin/ruby/lib/ruby/gems/2.4.0/gems/openssl-2.0.4 for inspection.
Results logged to C:/bin/ruby/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/openssl-2.0.4/gem_make.out
Gems updated: openssl
gem update openssl
ridk version
?ruby:
path: C:/bin/ruby
version: 2.4.1
platform: x64-mingw32
ruby_installer:
package_version: 2.4.1-1
git_commit: 6635d31
msys2:
path: C:\bin\msys64
title: MSYS2 64bit
version: '20161025'
cc: x86_64-w64-mingw32-gcc (Rev3, Built by MSYS2 project) 6.3.0
sh: GNU bash, version 4.3.46(2)-release (x86_64-pc-msys)
AppVeyor is a Windows CI service.
It is working PowerShell based environment.
I've got the following result:
c:/ruby24/bin/ruby extconf.rb
c:/ruby24/lib/ruby/site_ruby/ruby_installer/dll_directory.rb:75:in `add_dll_directory_winapi': AddDllDirectory failed (RubyInstaller::DllDirectory::WinApiError)
from c:/ruby24/lib/ruby/site_ruby/ruby_installer/dll_directory.rb:46:in `initialize'
from c:/ruby24/lib/ruby/site_ruby/ruby_installer/msys2_installation.rb:63:in `new'
from c:/ruby24/lib/ruby/site_ruby/ruby_installer/msys2_installation.rb:63:in `enable_dll_search_paths'
from c:/ruby24/lib/ruby/site_ruby/ruby_installer.rb:26:in `enable_dll_search_paths'
from c:/ruby24/lib/ruby/2.4.0/rubygems/defaults/operating_system.rb:7:in `<top (required)>'
from c:/ruby24/lib/ruby/2.4.0/rubygems.rb:1345:in `require'
from c:/ruby24/lib/ruby/2.4.0/rubygems.rb:1345:in `<top (required)>'
from <internal:gem_prelude>:4:in `require'
from <internal:gem_prelude>:4:in `<internal:gem_prelude>'
rake aborted!
https://ci.appveyor.com/project/cosmo0920/win32-api/build/47/job/ep9h2sw4g17ivb3g#L477
Re d21930d, I think there are a few std-lib 'libraries' that load 'extension'/c code. For instance, CGI, JSON and racc/cparse.
Would you accept a PR like test_std_lib.rb?
A little easier to keep track of...
I'm running into an issue with the MSYS2 installer, running on a Windows .NET Core (v4.6) box, where the installation will not begin/complete
Download the latest ruby 2.4 via chocolatey
Execute C:\tools\ruby24\ridk.cmd or ridk.ps1
Press 1 to perform base MSYS2 installation
Observe output MSYS2 seems to be unavailable
and Installation failed: MSYS2 installer failed
ridk version
and ridk install
:C:\tools\ruby24>C:\tools\ruby24\bin\ridk.cmd version
---
ruby:
path: C:/tools/ruby24
version: 2.4.1
platform: x64-mingw32
ruby_installer:
package_version: 2.4.1-2
git_commit: a2667ee
Output of ridk install
:
C:\tools\ruby24>C:\tools\ruby24\bin\ridk.cmd install
_____ _ _____ _ _ _ ___
| __ \ | | |_ _| | | | | | |__ \
| |__) | _| |__ _ _ | | _ __ ___| |_ __ _| | | ___ _ __ ) |
| _ / | | | '_ \| | | | | | | '_ \/ __| __/ _` | | |/ _ \ '__/ /
| | \ \ |_| | |_) | |_| |_| |_| | | \__ \ || (_| | | | __/ | / /_
|_| \_\__,_|_.__/ \__, |_____|_| |_|___/\__\__,_|_|_|\___|_||____|
__/ | _
|___/ _|_ _ __ | | o __ _| _ _
| (_) | |^| | | |(_|(_)\^/_>
1 - MSYS2 base installation
2 - MSYS2 system update
3 - MSYS2 and MINGW development toolchain
Which components shall be installed? If unsure press ENTER [1,2,3] 1
MSYS2 seems to be unavailable
Verify integrity of msys2-x86_64-20161025.exe ... OK
Run the MSYS2 installer ...
> C:\Users\ADMINI~1\AppData\Local\Temp\2/msys2-x86_64-20161025.exe
Failed
Installation failed: MSYS2 installer failed
The install is failing, so I can't resolve gem dependencies relying on them. For example, libyajl2:
C:\tools\ruby24\alex>..\bin\gem install libyajl2
MSYS2 could not be found. Please run 'ridk install'
or download and install MSYS2 manually from https://msys2.github.io/
I see license files for the gems, rake, and gem itself. But, I don't see a license file for the Ruby language/execution environment. Is this somewhere where I'm not seeing it?
I'm on Windows 10 if that affects the response (path description).
Current ridk version
displays path information for MSYS2 but not for Ruby itself:
C:\Users\Luis>ridk version
---
ruby:
version: 2.4.0
platform: x64-mingw32
ruby_installer:
version: 2.4.0-8
git_commit: ec1919d
msys2:
path: c:\msys64
title: MSYS2 64bit
version: '20161025'
cc: x86_64-w64-mingw32-gcc (Rev2, Built by MSYS2 project) 6.3.0
sh: GNU bash, version 4.3.46(2)-release (x86_64-pc-msys)
I believe that adding information about which path
ruby was installed will be helpful to debug issues (specially if user installed in a path with spaces)
I can send a pull request, wanted to confirm this is 👍 or 👎
Thank you. ❤️ ❤️ ❤️
I installed Ruby 2.4.1 with rubyinstaller-2.4.1-1rc2-x64.exe and I am using Japanese Windows 10:
The CHANGELOG says "Encoding.default_external is now UTF-8 — no longer ancient cpXYZ encoding when reading files.", but this is not ideal for Japanese users because Japanese characters are garbled in irb:
c:\>irb
irb(main):001:0> a='あいうえお'
=> "\x{82A0}\x{82A2}\x{82A4}\x{82A6}\x{82A8}"
irb(main):002:0> Encoding.default_external
=> #<Encoding:UTF-8>
I had to specify codepage with "-E" option:
c:\>irb -E CP932
irb(main):001:0> a='あいうえお'
=> "あいうえお"
irb(main):002:0> Encoding.default_external
=> #<Encoding:Windows-31J>
So I think Encoding.default_external should reflect OS codepage like before.
In previous discussions here or even in old RI issues, I may have hinted at this issue.
Recently I've been building & testing ruby_2_3 & ruby_2_4 stable builds with rubygems and all gems updated (info here). I did this to check whether there might be commits to trunk that should be backported but haven't been. Anyway, the work clarified the isssue somewhat...
I think consideration should be given to using the MSYS2/MinGW environment (MSYS2) only for building/compiling/installing, and adding code to copy package dll's to bin\ruby_builtin_dlls
(and other locations like lib
for OpenSSL) as required.
Your may be thinking about something similar; I won't go into the reasons, but I'd be happy to.
By doing something like this, it would allow multiple ruby install's to remain independent, allow users to use different package versions for testing, gem development, etc. Someone could even create a 'Rails' ruby install package with all the required dll's and maybe even gems (not suggesting we do it).
In some respects, it may help with 'dll hell' issues that I think are very possible. It won't solve all of them, but it might be a strong step in the right direction.
The attached code is a simple POC for getting dll info from a package. You may already have the same. With a few changes, it could move/copy dll's from MSYS2 to the ruby install. Used with spec.metadata["msys2_mingw_dependencies"]
, it should be relatively easy to implement, most difficult part being how to parse/change the manifest.
BTW, thanks for the PR in OpenSSL, I keep forgetting about metadata, as I've come across some gems it should be added to. Thanks again for all your work.
If ruby is in the PATH, it's DLLs can interference with other programs.
This can be avoided by adding a side-by-side private assembly to ruby.exe, which links to the bundled DLLs in a sub directory.
The corresponding pull request for rubyinstaller is: oneclick/rubyinstaller#322
FFI::DynamicLibrary.open("libusb-1.0.dll",0) # => LoadError: Could not open library 'libusb-1.0.dll': Falscher Parameter.
FFI makes use of LoadLibraryEx() with LOAD_WITH_ALTERED_SEARCH_PATH
since it's very first commit . However this requires an absolute dll path. A relative path like "libusb-1.0.dll"
should locate the DLL in c:\msys64\mingw32\bin\libusb-1.0.dll
, but it doesn't, because LOAD_WITH_ALTERED_SEARCH_PATH
doesn't allow relative paths.
In contrary Fiddle.dlopen('libusb-1.0.dll')
works as expected and loads the dll. It uses the basic LoadLibrary()
call.
IMHO this is a FFI bug and should be filed there.
This project is for Ruby version 2.4 and newer.
For Ruby versions < 2.4 please file an issue here.
Included bin/rake script is using "/mingw64/bin/ruby.exe" for the interpreter.
Issue was resolved by changing the interpreter to "/usr/bin/env ruby" to match the other scripts.
Open mingw64 msys shell, execute "rake".
ridk version
?ruby:
path: C:/Ruby24-x64
version: 2.4.1
platform: x64-mingw32
ruby_installer:
package_version: 2.4.1-1rc2
git_commit: 1b324f5
msys2:
path: C:\msys64
title: MSYS2 64bit
version: '20161025'
cc: x86_64-w64-mingw32-gcc (Rev2, Built by MSYS2 project) 6.3.0
sh: GNU bash, version 4.4.12(1)-release (x86_64-pc-msys)
I've got the packagers up at MSP-Greg/ruby-makepkg-mingw.
Builds gdbm, libyaml, and openssl. Provided some scripts also.
Since I've been working with RI, I've only done 32 bit builds. Of the three packages, only the openssl package has x64 appended to dll file names. Not sure if that's normal, or if I'm missing a build setting.
Anyway, see the readme.
Of course, I'm very interested in what you (and others?) find as far as building and testing...
Reminder, that one line in PKGBUILD.
Also, wondering if you and others can give the native readline some testing. Seems to work on my builds, but there are some test issues. They might be caused by the testing trying to mimic console input, which may be an issue with Windows.
No milliseconds from File.mtime
.
File.exist?('env') #=> true
File.mtime('env').usec #=> 0 <- zero!
From Bash on Windows:
File.mtime('env').usec #=> 483623
ridk version
?>ridk version
---
ruby:
path: C:/Ruby24-x64
version: 2.4.1
platform: x64-mingw32
ruby_installer:
package_version: 2.4.1-1
git_commit: 6635d31
msys2:
path: C:\msys64
title: MSYS2 64bit
version: '20161025'
sh: GNU bash, version 4.3.46(2)-release (x86_64-pc-msys)
RubyInstaller2 distinguishs between search paths for executables (EXEs) and libraries (DLLs). Executables are searched based on the PATH environment variable and DLLs are searched in the system32 path, ruby builtin DLL path and MSYS2-MINGW path. In addition there is the method RubyInstaller::Runtime.add_dll_directory
, which can be used to add DLL directories at runtime for the given ruby process.
It would be desirable to add DLL search directories per ENV variable, similar to LD_LIBRARY_PATH
on Unix like systems. This would also allow to set the DLL search paths in a way that is inherited to sub ruby processes.
The classic way to enable DLLs for ruby is to add it to the PATH
like so:
C:\Program Files\PostgreSQL\9.6\bin
to the PATH
gem install pg --platform ruby
ruby -rpg -e "PG.connect"
This currently results in the following failure, because the libpq.dll can not be loaded:
LoadError: cannot load such file -- 2.4/pg_ext
See also the test failures on appveyor: https://ci.appveyor.com/project/larskanis/ruby-pg-xa3f5
ridk version
?rubyinstaller-2.4.1-1
We are currently upgrading to Ruby 2.3 at the moment, and we plan on then staying at 2.3 not for long before going to 2.4
At the moment, every release candidate is a pre-release candidate, and I have not found any stable exe's online.
At what point do you plan on Releasing Ruby 2.4.0 for Windows as a stable RC, or 2.4.1?
If you have already done so, you should mark these releases using the same version so I can point non-tech people where to go to get installers.
This project is for Ruby version 2.4 and newer.
For Ruby versions < 2.4 please file an issue here.
When pressing ENTER on the
1 - MSYS2 base installation
2 - MSYS2 repository update
3 - MSYS2 and MINGW development toolchain
Which components shall be installed? [1,2,3]
prompt to use the default to install all components, I get
installing mingw-w64-x86_64-gcc (6.3.0-3) breaks dependency 'mingw-w64-x86_64-gcc=6.2.0-2'
...
Install MSYS2 and MINGW development toolchain failed
Installation failed: pacman failed
Run rubyinstaller-2.4.1-1-x64.exe
and accept all defaults.
ridk version
?I don't get that far.
I installed the SDK components using ridk install
as one user, but another user is unable to install gems that require compiling.
Background: I run Ruby on build servers where the build agent user is different from the one installing Ruby and the SDK.
As user A:
ridk install
gem install nokogumbo
-> succeedsgem uninstall nokogumbo
As user B:
gem install nokogumbo
-> fails:
$ gem install nokogumbo
MSYS2 could not be found. Please run 'ridk install'
or download and install MSYS2 manually from https://msys2.github.io/
ridk version
?$ ridk version
---
ruby:
path: C:/Ruby
version: 2.4.1
platform: x64-mingw32
ruby_installer:
package_version: 2.4.1-2
git_commit: a2667ee
sh: GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin)
ridk exec env
user A$ ridk exec env
!::=::\
!C:=C:\Users\agross
ACLOCAL_PATH=/mingw64/share/aclocal:/usr/share/aclocal
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\agross\AppData\Roaming
COMMONPROGRAMFILES=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=AXL
COMSPEC=C:\WINDOWS\system32\cmd.exe
DIRCMD=/o
FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING=Default
FP_NO_HOST_CHECK=NO
FSHARPINSTALLDIR=C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\
HOMEDRIVE=C:
HOMEPATH=\Users\agross
LOCALAPPDATA=C:\Users\agross\AppData\Local
LOGONSERVER=\\AXL
MANPATH=/mingw64/share/man
MINGW_PACKAGE_PREFIX=mingw-w64-x86_64
MSYSTEM=MINGW64
NUMBER_OF_PROCESSORS=8
OneDrive=C:\Users\agross\OneDrive
OS=Windows_NT
PATH=/c/Ruby/bin:/mingw64/bin:/usr/bin:/c/ProgramData/Oracle/Java/javapath:/c/Tools:/c/Tools/Growl:/c/Tools/Subversion:/c/Cygwin/bin:/c/Ruby/bin:/c/Elixir/Elixir/bin:/c/Elixir/Erlang/bin:/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/c/Program Files (x86)/Acronis/TrueImageHome:/c/Program Files/Microsoft/Web Platform Installer:/c/Program Files (x86)/Microsoft ASP.NET/ASP.NET Web Pages/v1.0:/c/Program Files (x86)/Microsoft SDKs/TypeScript/1.0:/c/Program Files/Microsoft SQL Server/120/Tools/Binn:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/110/Tools/Binn:/c/Program Files (x86)/Microsoft SQL Server/120/Tools/Binn:/c/Program Files/Microsoft SQL Server/120/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/120/Tools/Binn/ManagementStudio:/c/Program Files (x86)/Microsoft SQL Server/120/DTS/Binn:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/Windows/SysWOW64:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/Program Files/nodejs:/c/Program Files (x86)/Skype/Phone:/c/Program Files/dotnet:/c/Ruby/bin:/c/Users/agross/.dnx/bin:/c/Users/agross/AppData/Local/Microsoft/WindowsApps:/c/Users/agross/AppData/Roaming/npm:/c/Users/agross/AppData/Local/Microsoft/WindowsApps
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;RBW;.RB;.RBW
PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 26 Stepping 5, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=1a05
ProgramData=C:\ProgramData
PROGRAMFILES=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$_$E[0;33m$P$E[0m$_$$$S
PSModulePath=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\
PUBLIC=C:\Users\Public
RI_DEVKIT=C:\Ruby\sdk
SESSIONNAME=Console
SSH_AGENT_PID=13800
SSH_AUTH_SOCK=C:\Cygwin\tmp\ssh-Dy4GeIa816Pe\agent.2508
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINDOWS
TEMP=/c/Users/agross/AppData/Local/Temp
TMP=/c/Users/agross/AppData/Local/Temp
ULTRAMON_LANGDIR=C:\Program Files\UltraMon\Resources\en
USERDOMAIN=AXL
USERDOMAIN_ROAMINGPROFILE=AXL
USERNAME=agross
USERPROFILE=C:\Users\agross
VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
WINDIR=C:\WINDOWS
_NT_SYMBOL_PATH=SRV*c:\Symbols*http://referencesource.microsoft.com/symbols*http://msdl.microsoft.com/download/symbols
TERM=cygwin
HOME=/home/agross
ridk exec env
user B$ ridk exec env
MSYS2 could not be found. Please run 'ridk install'
or download and install MSYS2 manually from https://msys2.github.io/
!C:=C:\Windows\System32
!D:=D:\Users\agross\Downloads
!ExitCode=00000000
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\Administrator\AppData\Roaming
COMMONPROGRAMFILES=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=AXL
COMSPEC=C:\WINDOWS\system32\cmd.exe
DIRCMD=/o
FP_NO_HOST_CHECK=NO
FSHARPINSTALLDIR=C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\
HOMEDRIVE=C:
HOMEPATH=\WINDOWS\system32
LOCALAPPDATA=C:\Users\Administrator\AppData\Local
NUMBER_OF_PROCESSORS=8
OneDrive=C:\Users\Administrator\OneDrive
OS=Windows_NT
PATH=/c/ProgramData/Oracle/Java/javapath:/c/Tools:/c/Tools/Growl:/c/Tools/Subversion:/usr/bin:/c/Ruby/bin:/c/Elixir/Elixir/bin:/c/Elixir/Erlang/bin:/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/c/Program Files (x86)/Acronis/TrueImageHome:/c/Program Files/Microsoft/Web Platform Installer:/c/Program Files (x86)/Microsoft ASP.NET/ASP.NET Web Pages/v1.0:/c/Program Files (x86)/Microsoft SDKs/TypeScript/1.0:/c/Program Files/Microsoft SQL Server/120/Tools/Binn:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/110/Tools/Binn:/c/Program Files (x86)/Microsoft SQL Server/120/Tools/Binn:/c/Program Files/Microsoft SQL Server/120/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/120/Tools/Binn/ManagementStudio:/c/Program Files (x86)/Microsoft SQL Server/120/DTS/Binn:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/Windows/SysWOW64:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/Program Files/nodejs:/c/Program Files (x86)/Skype/Phone:/c/Program Files/dotnet:/c/Users/Administrator/AppData/Local/Microsoft/WindowsApps
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;RBW
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 26 Stepping 5, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=1a05
ProgramData=C:\ProgramData
PROGRAMFILES=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$_$E[0;33m$P$E[0m$_$$$S
PSModulePath=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\
PUBLIC=C:\Users\Public
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINDOWS
TEMP=/c/Users/ADMINI~1/AppData/Local/Temp
TMP=/c/Users/ADMINI~1/AppData/Local/Temp
ULTRAMON_LANGDIR=C:\Program Files\UltraMon\Resources\en
USERDOMAIN=AXL
USERNAME=Administrator
USERPROFILE=C:\Users\Administrator
VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
WINDIR=C:\WINDOWS
_NT_SYMBOL_PATH=SRV*c:\Symbols*http://referencesource.microsoft.com/symbols*http://msdl.microsoft.com/download/symbols
TERM=cygwin
HOME=/home/Administrator
On chocolatey-managed environments, the default installation of MSYS2 package gets instaled in a differen directory and doesn't add details into the registry, thus not being detected by RubyInstaller.
By default Chocolatey installs it into C:\tools\msys64
, which differs from the default directory that RubyInstaller might be looking for.
ridk
choco install -y msys2
msystem msys
, install toolchain as indicated in the README: pacman -S base-devel mingw-w64-x86_64-toolchain
ridk version
, there is no mention of cc or sh.msystem mingw64
, GCC information is displayed in ridk version
C:\Users\Luis>gcc --version
'gcc' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Luis>msystem mingw64
<MINGW64> C:\Users\Luis>gcc --version
gcc (Rev2, Built by MSYS2 project) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
<MINGW64> C:\Users\Luis>ridk version
---
ruby:
path: C:/Ruby24-x64
version: 2.4.0
platform: x64-mingw32
ruby_installer:
version: 2.4.0-8
git_commit: c55856f
cc: x86_64-w64-mingw32-gcc (Rev2, Built by MSYS2 project) 6.3.0
<MINGW64> C:\Users\Luis>gem install oj --platform=ruby
Fetching: oj-2.18.1.gem (100%)
MSYS2 could not be found.
Please download and install MSYS2 from https://msys2.github.io/
ridk version
?---
ruby:
path: C:/Ruby24-x64
version: 2.4.0
platform: x64-mingw32
ruby_installer:
version: 2.4.0-8
git_commit: c55856f
If this is too complicated to resolve, perhaps it will be required to add a caveat into the documentation about it.
Thank you. ❤️ ❤️ ❤️
Given no MSYS2 was previously installed, attempt to gem install
something that requires a compiler presents the following message:
C:\Users\Luis>gem install sqlite3 --platform=ruby
Fetching: sqlite3-1.3.13.gem (100%)
MSYS2 could not be found.
Please download and install MSYS2 from https://msys2.github.io/
Considering ridk
was introduced to simplify MSYS2 installation, it might be better recommend it instead of a link to the MSYS2 website.
ridk version
?---
ruby:
path: C:/Ruby24-x64
version: 2.4.0
platform: x64-mingw32
ruby_installer:
version: 2.4.0-8
git_commit: c55856f
Submitting this to gather feedback and suggestions for the displayed message.
Thank you. ❤️ ❤️ ❤️
The gem is compiled without any errors with msys2 toolchain.
But oci8lib_240.so load error is coming when I use the gem.
Gems with pure ruby code are working fine.
Both readline-6.3 and readline-7.0 are broken on Windows. Therefore irb
isn't fun to use. It's probably best to switch to rb-readline.gem, as the RubyInstaller does.
I'm interested to understand the rationale behind https://github.com/oneclick/rubyinstaller2/blob/master/recipes/compile/ruby-2.4.1/0005-utf-8-default-encoding.patch
Ruby has a long history of using the systems codepage for Encoding.default_external on Windows as the default as it influences (amongst other things):
UTF-8, while commonly the default on Linux, is a bit of a peculiar default on Windows for a few reasons:
chcp
or the Windows codepage APIs) - a lot of legacy applications still use the active codepage when encoding files on Windowschcp
, Ruby should set Encoding.default_external
to UTF-8There are a few problems I see with the change to use UTF-8 as the default for Ruby on Windows:
.y
release (arguably should be a Ruby 3.y change)Encoding.default_external
-E
switch - for instance, ruby -E UTF-8
, without patching the Ruby sourceMy recommendation would be to revert the UTF-8 patch so that Ruby behaves as originally intended.
Hi guys,
Thank you for marking the new Ruby installer for Windows!
I've noticed the installer is based on InnoSetup, so assume silent (unattended) installation mode is supported, but still I'd like to clarify what would be exact command to install Ruby 2.4 without dependencies such as MSYS.
Thank you!
Maybe I'm losing my mind, but I can't find it...
The default irb console isn't convenient. It doesn't provide a history or auto-completion.
I would like to add a default .irbrc
as an extension to RI2 like this:
require 'irb/completion'
require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 1000
The irb
command could check on every run, if the .irbrc
exists and if not it could write the default one.
This should make RI2 more user friendly.
Failed to override the executable when executing gem update
.
When I am prompted whether to overwrite the executable, I cannot type y
to the command prompt.
My OS is Windows 10 Build 16199 in Simplified Chinese.
I have no idea what to do other than calling gem install rdoc
.
ridk version
?ruby:
path: D:/local/Ruby/stable
version: 2.4.1
platform: x64-mingw32
ruby_installer:
package_version: 2.4.1-1
git_commit: 6635d31
msys2:
path: D:\local\msys64
cc: x86_64-w64-mingw32-gcc (Rev3, Built by MSYS2 project) 6.3.0
sh: GNU bash, version 4.4.12(1)-release (x86_64-pc-msys)
This project is for Ruby version 2.4 and newer.
For Ruby versions < 2.4 please file an issue here.
x64-msvcrt-ruby230.dll does not depend on libgmp-10.dll
In addition to the system comes with no other dll files.
x64-msvcrt-ruby240.dll could dose not depends libgmp-10.dll?
ridk version
?This project is for Ruby version 2.4 and newer.
For Ruby versions < 2.4 please file an issue here.
So many error screen
C:\Ruby\dev>gem update
Updating installed gems
Updating bigdecimal
Fetching: bigdecimal-1.3.2.gem (100%)
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing bigdecimal:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby/lib/ruby/gems/2.4.0/gems/bigdecimal-1.3.2/ext/bigdecimal
C:/Ruby/bin/ruby.exe -r ./siteconf20170706-10832-1eiibdu.rb extconf.rb
checking for labs() in stdlib.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby/bin/$(RUBY_BASE_NAME)
C:/Ruby/lib/ruby/2.4.0/mkmf.rb:457:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:542:in
try_link0'
from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:557:in try_link' from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:768:in
try_func'
from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:1055:in block in have_func' from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:945:in
block in checking_for'
from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:351:in block (2 levels) in postpone' from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:321:in
open'
from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:351:in block in postpone' from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:321:in
open'
from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:347:in postpone' from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:944:in
checking_for'
from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:1054:in have_func' from extconf.rb:6:in
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/bigdecimal-1.3.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby/lib/ruby/gems/2.4.0/gems/bigdecimal-1.3.2 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/bigdecimal-1.3.2/gem_make.out
Updating did_you_mean
Fetching: did_you_mean-1.1.2.gem (100%)
Successfully installed did_you_mean-1.1.2
Parsing documentation for did_you_mean-1.1.2
Installing ri documentation for did_you_mean-1.1.2
Installing darkfish documentation for did_you_mean-1.1.2
Done installing documentation for did_you_mean after 0 seconds
Parsing documentation for did_you_mean-1.1.2
Done installing documentation for did_you_mean after 0 seconds
Updating json
Fetching: json-2.1.0.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator
C:/Ruby/bin/ruby.exe -r ./siteconf20170706-10832-16c4tcz.rb extconf.rb
creating Makefile
current directory: C:/Ruby/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator
make "DESTDIR=" clean
'make' is not recognized as an internal or external command,
operable program or batch file.
current directory: C:/Ruby/lib/ruby/gems/2.4.0/gems/json-2.1.0/ext/json/ext/generator
make "DESTDIR="
'make' is not recognized as an internal or external command,
operable program or batch file.
make failed, exit code 1
Gem files will remain installed in C:/Ruby/lib/ruby/gems/2.4.0/gems/json-2.1.0 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/json-2.1.0/gem_make.out
Updating minitest
Fetching: minitest-5.10.2.gem (100%)
Successfully installed minitest-5.10.2
Parsing documentation for minitest-5.10.2
Installing ri documentation for minitest-5.10.2
Installing darkfish documentation for minitest-5.10.2
Done installing documentation for minitest after 2 seconds
Parsing documentation for minitest-5.10.2
Done installing documentation for minitest after 0 seconds
Updating openssl
Fetching: openssl-2.0.4.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing openssl:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby/lib/ruby/gems/2.4.0/gems/openssl-2.0.4/ext/openssl
C:/Ruby/bin/ruby.exe -r ./siteconf20170706-10832-6jjv43.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby/bin/$(RUBY_BASE_NAME)
--with-openssl-dir
--without-openssl-dir
--with-openssl-include
--without-openssl-include=${openssl-dir}/include
--with-openssl-lib
--without-openssl-lib=${openssl-dir}/lib
--with-kerberos-dir
--without-kerberos-dir
--with-kerberos-include
--without-kerberos-include=${kerberos-dir}/include
--with-kerberos-lib
--without-kerberos-lib=${kerberos-dir}/lib
C:/Ruby/lib/ruby/2.4.0/mkmf.rb:457:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:572:in
block in try_compile'
from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:525:in with_werror' from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:572:in
try_compile'
from C:/Ruby/lib/ruby/gems/2.4.0/gems/openssl-2.0.4/ext/openssl/deprecation.rb:5:in deprecated_warning_flag' from extconf.rb:23:in
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/openssl-2.0.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby/lib/ruby/gems/2.4.0/gems/openssl-2.0.4 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/openssl-2.0.4/gem_make.out
Updating power_assert
Fetching: power_assert-1.0.2.gem (100%)
Successfully installed power_assert-1.0.2
Parsing documentation for power_assert-1.0.2
Installing ri documentation for power_assert-1.0.2
Installing darkfish documentation for power_assert-1.0.2
Done installing documentation for power_assert after 0 seconds
Parsing documentation for power_assert-1.0.2
Done installing documentation for power_assert after 0 seconds
Updating psych
Fetching: psych-2.2.4.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing psych:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby/lib/ruby/gems/2.4.0/gems/psych-2.2.4/ext/psych
C:/Ruby/bin/ruby.exe -r ./siteconf20170706-10832-1sdr9j7.rb extconf.rb
checking for yaml.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby/bin/$(RUBY_BASE_NAME)
--with-libyaml-dir
--without-libyaml-dir
--with-libyaml-include
--without-libyaml-include=${libyaml-dir}/include
--with-libyaml-lib
--without-libyaml-lib=${libyaml-dir}/lib
--enable-bundled-libyaml
--disable-bundled-libyaml
C:/Ruby/lib/ruby/2.4.0/mkmf.rb:457:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:588:in
try_cpp'
from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:1148:in block in find_header' from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:945:in
block in checking_for'
from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:351:in block (2 levels) in postpone' from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:321:in
open'
from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:351:in block in postpone' from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:321:in
open'
from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:347:in postpone' from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:944:in
checking_for'
from C:/Ruby/lib/ruby/2.4.0/mkmf.rb:1147:in find_header' from extconf.rb:10:in
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/psych-2.2.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby/lib/ruby/gems/2.4.0/gems/psych-2.2.4 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/psych-2.2.4/gem_make.out
Updating rdoc
Fetching: rdoc-5.1.0.gem (100%)
rdoc's executable "rdoc" conflicts with C:/Ruby/bin/rdoc
Overwrite the executable? [yN] y
rdoc's executable "ri" conflicts with C:/Ruby/bin/ri
Overwrite the executable? [yN] y
Successfully installed rdoc-5.1.0
Parsing documentation for rdoc-5.1.0
Installing ri documentation for rdoc-5.1.0
Installing darkfish documentation for rdoc-5.1.0
Done installing documentation for rdoc after 16 seconds
Parsing documentation for rdoc-5.1.0
Done installing documentation for rdoc after 8 seconds
Updating test-unit
Fetching: test-unit-3.2.5.gem (100%)
Successfully installed test-unit-3.2.5
Parsing documentation for test-unit-3.2.5
Installing ri documentation for test-unit-3.2.5
Installing darkfish documentation for test-unit-3.2.5
Done installing documentation for test-unit after 4 seconds
Parsing documentation for test-unit-3.2.5
Done installing documentation for test-unit after 2 seconds
Updating xmlrpc
Fetching: xmlrpc-0.3.0.gem (100%)
Successfully installed xmlrpc-0.3.0
Parsing documentation for xmlrpc-0.3.0
Installing ri documentation for xmlrpc-0.3.0
Installing darkfish documentation for xmlrpc-0.3.0
Done installing documentation for xmlrpc after 1 seconds
Parsing documentation for xmlrpc-0.3.0
Done installing documentation for xmlrpc after 0 seconds
Gems updated: bigdecimal did_you_mean json minitest openssl power_assert psych rdoc test-unit xmlrpc
C:\Ruby\dev>
ridk version
?ruby:
path: C:/Ruby
version: 2.4.1
platform: x64-mingw32
ruby_installer:
package_version: 2.4.1-2
git_commit: a2667ee
msys2:
path: C:\MyPrograms\MSYS2
title: MSYS2 32bit
version: '20161025'
sh: GNU bash, version 4.4.12(1)-release (i686-pc-msys)
First of all, thank you and a wonderful start. I could even (maybe?) help with maintenance, even though I'm not a c guy...
'First pass thru' items:
make -l "TESTOPTS=-v -q" test-all > "D:\make_test-all.txt"
result was --
16496 tests, 2226300 assertions, 14 failures, 182 errors, 151 skips
Many were in gdbm
, probably due to item 2. I did comment out the lines in test_enum.rb mentioned over in RubyInstaller, as without them commented out, I had a segfault. That segfault also happened with my msys2 / gcc 6.2.0 build based on RubyInstaller.
Here's what I have for gdbm packages --
$ pacman -Ss gdbm
mingw32/mingw-w64-i686-gdbm 1.12-1 [installed]
GNU database library (mingw-w64)
mingw64/mingw-w64-x86_64-gdbm 1.12-1 [installed]
GNU database library (mingw-w64)
msys/gdbm 1.11-3 (Database) [installed]
GNU database library
msys/libgdbm 1.11-3 (libraries) [installed]
GNU database library
msys/libgdbm-devel 1.11-3 (development) **not installed**
libgdbm headers and libraries
In my package\ruby-2.4.0 folder
, I have ruby-2.4.0.tar.bz2
, it also exists in the package\ruby-2.4.0\src
folder. Maybe that's needed...
It would be helpful if one could skip the RDoc/ri step. Then again, I'm somewhat opinionated about docs, and I want to review code on a tablet. See msp-greg.github.io.
Obviously, you just got started, but local and other branches/tags would be helpful.
I would hope that if everyone can help get the make test-all
issues down to a small and repeatable set, maybe the Ruby-Core team will be willing to test and work (more) on Windows issues, along with some of the gem authors.
Thanks again...
Greetings! Just ran across this issue today. It's a minor annoyance as it doesn't block the installation from finishing, however there is a window that pops open for MSYS2, even when you install Ruby with /VERYSILENT
. This was not seen in earlier versions of Ruby using the legacy (?) RubyInstaller.
I reviewed the wiki to see if any new switches have been added but found none.
https://github.com/oneclick/rubyinstaller2/wiki/FAQ#user-content-silent-install
/verysilent /dir="c:\ruby24" /tasks="assocfiles,modpath"
A fully silent install should not have any windows come up. With /SILENT
it is probably okay, but with /VERYSILENT
the common expectation is that nothing should show up.
The file c:\Ruby24-x64\ssl\cert.pem
is used by RI2-OpenSSL to verify TLS peers. However this file is currently empty.
Rubygems and Bundler work, because they ship their own certificates as a last resort. But connections to other peers fail.
We should ship our own list of trusted certificates (preferably the CA list of Mozilla) or connect to the system store (which is not complete on Windows but updated on demand, AFAIK).
This project is for Ruby version 2.4 and newer.
For Ruby versions < 2.4 please file an issue here.
"readline is one of the external dependencies that the ruby stdlib depends on. The RubyInstaller distribution uses a pure-ruby implementation of readline in lieu of GNU-readline"
I feel we need readline installed as part of the download. Should we be using the pure ruby readline or should we use libreadline with the new rubinstaller2
A gem built from current gemspec
bundles various (IMO: unnecessary) files as illustrated below:
<GEM>
- ├─── .github
- │ └─── ISSUE_TEMPLATE.md
├─── gems
├─── lib
│ └─── ruby_installer
│ ├─── build
│ └─── runtime
│ └─── components
├─── packages
│ └─── rubyinstaller
├─── recipes
│ ├─── archive-7z
│ ├─── compile
│ │ └─── ruby-2.4.1
│ ├─── installer-inno
│ │ └─── images
│ ├─── sandbox
│ └─── unpack
├─── resources
│ ├─── files
│ ├─── icons
│ └─── ssl
│
- ├─── .gitignore
- ├─── .yardopts
- ├─── appveyor.yml
├─── CHANGELOG.md
- ├─── Gemfile
├─── LICENSE.txt
- ├─── Rakefile
├─── README.md
└─── rubyinstaller-build.gemspec
Currently, we have a regex to blacklist
only certain tests-related directories.
Thoughts?
Attempted to use RubyGems Documentation Server and access the RDoc generated for rake
gem with issues.
rake
gem: gem install rake --document
[rdoc]
linkridk version
?---
ruby:
path: C:/Ruby24-x64
version: 2.4.0
platform: x64-mingw32
ruby_installer:
version: 2.4.0-8
git_commit: c55856f
I'm fairly certain that __MINGW64_VERSION_MAJOR
is defined for the current release of MinGW / MSYS2.
See https://gist.github.com/jonforums/968522.
Hence, I suspect the patch 0001-mingw-w64-time-functions.patch is no longer needed.
I haven't been using it with my local builds for quite a while, and I'm around ten total failures and errors using --with-out-ext=pty,syslog
.
Again, thanks for all your work.
Just a news from rubylang website: The release of 2.4.1 is available.
Regards ;-)
ridk version
?It would nice to be able to build the latest ruby path level from source and archive the results in an easy-to-use 7z.
Jon@Sphinx MSYS ~
$ pacman -Ss 7zip
msys/p7zip 9.38.1-1 (compression)
Command-line version of the 7zip compressed file archiver
Lets lint the Ruby code with Rubocop and maintain uniformity throughout the codebase, especially acting as a guideline for future contributors to write consistent code with current style.
Additionally, conform to Community Style Guidelines followed by Rubocop.
I'm totally unsure whether this is a problem in rubyinstaller2 or just me doing something wrong, but since release is close, I figure it's better to make sure and help making the final release great :)
I'm having problems using readline
via byebug.
I installed a virtual windows machine with virtualbox and then installed the 2.4.1-1rc2
via the exe file in the releases page. Then, I think I chose number 3 from the options about ridk
installation... Now I open a terminal via "Start Command Prompt with Ruby" and do the following.
git clone https://github.com/deivid-rodriguez/byebug
cd byebug
bundle
bundle exec rake
This sucessfully installs all depencies, sucessfully compiles byebug's C-extension (as part of bundle exec rake
), but fails when requiring byebug
to run the tests. This is the error:
Sorry, you can't use byebug without Readline. To solve this, you need to
rebuild Ruby with Readline support. If using Ubuntu, try `sudo apt-get
install libreadline-dev` and then reinstall your Ruby.
rake aborted!
LoadError: cannot load such file -- readline
C:/Users/IEUser/byebug/lib/byebug/history.rb:2:in `require'
C:/Users/IEUser/byebug/lib/byebug/history.rb:2:in `<top (required)>'
C:/Users/IEUser/byebug/lib/byebug/interface.rb:2:in `require'
C:/Users/IEUser/byebug/lib/byebug/interface.rb:2:in `<top (required)>'
C:/Users/IEUser/byebug/lib/byebug/core.rb:5:in `require'
C:/Users/IEUser/byebug/lib/byebug/core.rb:5:in `<top (required)>'
C:/Users/IEUser/byebug/test/support/test_case.rb:3:in `require'
C:/Users/IEUser/byebug/test/support/test_case.rb:3:in `<top (required)>'
C:/Users/IEUser/byebug/test/test_helper.rb:2:in `require'
C:/Users/IEUser/byebug/test/test_helper.rb:2:in `<top (required)>'
C:/Users/IEUser/byebug/test/commands/break_test.rb:1:in `require'
C:/Users/IEUser/byebug/test/commands/break_test.rb:1:in `<top (required)>'
C:/Users/IEUser/byebug/script/minitest_runner.rb:17:in `require'
C:/Users/IEUser/byebug/script/minitest_runner.rb:17:in `block in run'
C:/Users/IEUser/byebug/script/minitest_runner.rb:17:in `each'
C:/Users/IEUser/byebug/script/minitest_runner.rb:17:in `run'
C:/Users/IEUser/byebug/Rakefile:47:in `block in <top (required)>'
Tasks: TOP => default => test
I grepped commits with readline
and found:
8fc194f. I see that the related issue was closed after the change, so maybe readline 7.0 works again?
a2ec247. Here it seems that rb-readline
will be provided as a default gem or something instead of the "c-ext based" one. If I add rb-readline
to the Gemfile
, it all works as expected, but shouldn't this be provided by default?
ridk version
?C:\Users\IEUser\byebug>ridk version
---
ruby:
path: C:/Ruby24
version: 2.4.1
platform: i386-mingw32
ruby_installer:
package_version: 2.4.1-1rc2
git_commit: 1b324f5
msys2:
path: C:\msys32
title: MSYS2 32bit
version: '20161025'
cc: i686-w64-mingw32-gcc (Rev2, Built by MSYS2 project) 6.3.0
sh: GNU bash, version 4.3.46(2)-release (i686-pc-msys)
Thanks for your help!
According to mkmf.log
pkg-config is called and returns valid values, but is not accepted in the end.
when I run bundle install
,some err like this ``[]': invalid byte sequence in UTF-8 (ArgumentError)
`
D:/download/software/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bler/ui/shell.rb:111:in `[]': invalid byte sequence in UTF-8 (ArgumentError)
from D:/download/software/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler14.6/lib/bundler/ui/shell.rb:111:in `strip_leading_spaces'
from D:/download/software/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler14.6/lib/bundler/ui/shell.rb:116:in `word_wrap'
from D:/download/software/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler14.6/lib/bundler/ui/shell.rb:94:in `tell_me'
from D:/download/software/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler14.6/lib/bundler/ui/shell.rb:39:in `error'
from D:/download/software/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler14.6/lib/bundler/friendly_errors.rb:21:in `log_error'
from D:/download/software/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler14.6/lib/bundler/friendly_errors.rb:123:in `rescue in with_friendly_errors'
from D:/download/software/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler14.6/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
from D:/download/software/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler14.6/exe/bundle:24:in `<top (required)>'
from D:/download/software/Ruby24-x64/bin/bundle:22:in `load'
from D:/download/software/Ruby24-x64/bin/bundle:22:in `<main>'
I tried using this method,add the code into gemfile header,but still not work?
How can i solve it?
I just updated to GCC 7.1.0. Others may have noticed, but things are not good.
Running tests using
ruby runner.rb -j3 -Ilib --show-skip ruby
Results -
Last GCC 6.3 build I have:
5279 tests, 4110750 assertions, 3 failures, 0 errors, 25 skips
ruby -v: ruby 2.5.0dev (2017-07-03 trunk 59255) [x64-mingw32]
RI2 snapshot (7.1.0):
5279 tests, 3681817 assertions, 69 failures, 4 errors, 25 skips
ruby -v: ruby 2.5.0dev (2017-07-05 trunk 59268) [x64-mingw32]
My build today (7.1.0):
5279 tests, 3680486 assertions, 69 failures, 4 errors, 25 skips
ruby -v: ruby 2.5.0dev (2017-07-06 trunk 59273) [x64-mingw32]
The three 6.3.0 failures are expected outside of the normal make test-all
env. I'll try to investigate later today. Many of the failures seem sprintf related.
Edit: if you prefer to revert to 6.3, below are two scripts that should remove and add. Place in the usr/bin folder and run (remove 1st). I had to add the txt extension to attach them...
When attempting to gem install
a gem that requires building C-extension code, the build environment provided by mingw-w64 (installed from a separate project) is unusable or unrecognized. However, the ridk version
command correctly displays the GCC compiler shipped with mingw.
The environment appears to work outside of Ruby, as it successfully built and installed the Nimble package manager.
This is being done on a Windows 7 64-bit machine.
C:\arbitrary\path> gem install json
MSYS2 could not be found. Please run 'ridk install'
or download and install MSYS2 manually from https://msys2.github.io/
ridk version
?---
ruby:
path: D:/Ruby
version: 2.4.1
platform: x64-mingw32
ruby_installer:
package_version: 2.4.1-1
git_commit: 6635d31
cc: x86_64-w64-mingw32-gcc (x86_64-win32-seh-rev1, Built by MinGW-W64 project) 6.3.0
I recently installed one of the rubyinstaller2 releases and I don't know how to determine if it was 2.4.0-6 or 2.4.0-7. Is this information embedded into the installation? I could not find it.
If this information isn't included in the installation I would recommend that the installer place a RELEASE (or similar) file in the root of the installation directory. This file could include a link to the GitHub repository for this project and the commit associated with the build (in case someone doesn't install a pre-compiled release available on this GitHub repository).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.