ruby-prof / ruby-prof

A ruby profiler. See https://ruby-prof.github.io for more information.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: cannot load such file -- ruby_prof.so

Inversion-des opened this issue · comments

After installing on Window10 64bit

gem install ruby-prof  --no-document
	Fetching: ruby-prof-0.18.0-x64-mingw32.gem (100%)
	Successfully installed ruby-prof-0.18.0-x64-mingw32
	1 gem installed

I always have this result:

        4: from D:/statsoft/Ruby/2.5/lib/ruby/gems/2.5.0/gems/ruby-prof-0.18.0-x64-mingw32/lib/ruby-prof.rb:4:in `<top (required)>'
        3: from D:/statsoft/Ruby/2.5/lib/ruby/gems/2.5.0/gems/ruby-prof-0.18.0-x64-mingw32/lib/ruby-prof.rb:8:in `rescue in <top (required)>'
        2: from D:/statsoft/Ruby/2.5/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        1: from D:/statsoft/Ruby/2.5/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
D:/statsoft/Ruby/2.5/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require': cannot load such file -- ruby_prof.so (LoadError)

But if I do this

gem install ruby-prof -v 0.17.0  --no-document
	Temporarily enhancing PATH for MSYS/MINGW...
	Building native extensions. This could take a while...
	Successfully installed ruby-prof-0.17.0
	1 gem installed

native extension installed and all works fine.

Ruby version — ruby 2.5.5p157 (2019-03-15 revision 67260) [x64-mingw32]

Please help.

With Ruby 2.6 installation looks the same, but all works fine for me, no such error.
Ruby 2.6.3p62 (2019-04-16 revision 67580) [x64-mingw32]

>gem install ruby-prof
Fetching ruby-prof-0.18.0-x64-mingw32.gem
Successfully installed ruby-prof-0.18.0-x64-mingw32
1 gem installed

So a workaround is to use a fresh Ruby installation.

With Ruby 2.6 installation looks the same, but all works fine for me, no such error.
Ruby 2.6.3p62 (2019-04-16 revision 67580) [x64-mingw32]

>gem install ruby-prof
Fetching ruby-prof-0.18.0-x64-mingw32.gem
Successfully installed ruby-prof-0.18.0-x64-mingw32
1 gem installed

So a workaround is to use a fresh Ruby installation.

I can confirm this workaround works.
For me the gem installed fine with Ruby 2.5. The problem shows up when running ruby-prof. I just upgraded to Ruby 2.6 to see if this would resolve the issue and it does. Currently RubyInstaller still recommends running Ruby 2.5 for Windows though.

Yes, the file is ruby_prof.so on Windows. Maybe the so wasn't included in the gem.
About to release version 1.0.0, will make sure to include it.

Tracked this down, the version 0.18.0 had prebuilt binarires for Ruby 2.6 and not 2.5. Version 1.0.0 will include binaries for 2.5 and 2.6

Still an issue with version 1.4.1. Running on Windows 10 with ruby 2.5.7p206 (2019-10-01 revision 67816) [x64-mingw32].

gem 'ruby-prof', '~> 1.4', '>= 1.4.1'

Uncaught exception: cannot load such file -- ruby_prof.so

Yeah, I only included binaries for ruby 2.7 and maybe 2.6.

would be great if you could include the prebuilt binaries on all Windows ruby versions