ruby-bench / ruby-bench-web

Long Running Ruby Benchmarks
https://rubybench.org
MIT License
82 stars 47 forks source link

LoadError when requiring pg gem from directory at specific commit #244

Closed bmarkons closed 6 years ago

bmarkons commented 6 years ago

I've made setup for PG suite to be able to run for specific commit, like others.

It works fine when pg gem is required from github though fails when required from directory in which ruby-pg repo is cloned.

I do pull latest changes and bundle install, but driver.rb on run can't require pg with following error :

/ruby-pg/lib/pg.rb:4:in `require': cannot load such file -- pg_ext (LoadError)
    from /ruby-pg/lib/pg.rb:4:in `<top (required)>'
    from /ruby-bench-suite/pg/benchmarks/pg_suite_runner.rb:6:in `require'
    from /ruby-bench-suite/pg/benchmarks/pg_suite_runner.rb:6:in `<top (required)>'
    from driver.rb:3:in `require_relative'
    from driver.rb:3:in `<main>'

https://github.com/ruby-bench/ruby-bench-docker/blob/master/pg/runner

tgxworld commented 6 years ago

How is the gem being required from the specific directory?

bmarkons commented 6 years ago

I meant this : https://github.com/ruby-bench/ruby-bench-suite/blob/master/pg/Gemfile#L12

When I require it from path it throws error while requiring it from github master works fine (same commit btw).

bmarkons commented 6 years ago

I've tried to do it without bundler and do gem build and gem install and it worked. It could be a possible workaround, though I will investigate a bit more why it's not working in bundler setup.

bmarkons commented 6 years ago

Ah, forgot to compile. It's fixed now :ok_hand:

Thanks for having a look at this issue @tgxworld :clap: