Closed eregon closed 4 years ago
Could a single Gemfile be used for all Ruby versions?
Is the main issue that we want something like ruby RUBY_VERSION
in the Gemfile to make Bundler consider gems' minimum Ruby version requirements? Is there maybe another way to achieve that rather than having so many gemfiles?
Oh hey! I didn't properly update the current_ruby runner to use Gemfile generation. I've begun updating that in the branch current_ruby_gemfile_generator, though it's not quite right yet.
But you're right, the option isn't enough by itself and somehow I didn't properly update that runner when I updated the others. I use rvm_batching frequently (and since then), but I should probably retest rvm_rubies too or get rid of it.
Thanks, https://github.com/noahgibbs/rsb/commit/f4ce0fe28f124264d32fddfeeb1d9bb108eff227 looks good, although it would probably be best to move the logic to bench_lib.rb
so other runners like current_ruby_cli.rb
can use it as well.
I think a good way to make sure it keeps working would be to add this in .travis.yml
:
- runners/current_ruby_cli.rb --benchmark-seconds 5 rack puma
- runners/current_ruby_cli.rb --benchmark-seconds 5 rails puma
Currently those work with webrick
but not puma
, because the puma
gem is not added.
Okay. I think the changes on the branch should fix the problem - I'm having trouble with all this right now because of an unrelated (I think) libxml/nokogiri problem. The branch only touches the broken runner, and clearly does no harm, so I'm merging it to master. With luck I'll figure out my Nokogiri difficulties soon and either all's well, or I'll fix whatever the next item is...
In any case, it works with Rack. If the Nokogiri problem is hiding a Rails error, that's a new issue. Closing this one as fixed/merged.
@noahgibbs Thanks that fixes it for current_ruby.rb
.
I shared the logic and made it work for other runners in https://github.com/noahgibbs/rsb/pull/7
Since 73985c139e7afb0f0fb8c2a7dc650a2c389c855f which seems to break several things, the benchmarks do not run anymore.
For instance:
That variable can be renamed to
opts
, but then the result is unused, and e.g.puma
is not installed.How should this be fixed?