Running Discourse with Rubinius

performance

(Gabriel Southern) #1

Summary: I would like to be able to benchmark Discourse using Rubinius?

Details: I’m interested in testing Rubinius with the benchmarks at rubybench.org. I saw that Discourse is a significant part of the benchmark and so I first I tried seeing if I could get Discourse running with Rubinius.

I started following the steps in the Discourse Advanced Developer Install Guide (I’m limited to 2 links so I’ll skip this link as I assume its obvious what document I’m referring to).

and I ran into a problem with: bundle exec rake db:create db:migrate db:test:prepare db:seed_fu

This command failed and I’ve included the backtrace below. But the for those who don’t want to read it, the problem is that Rubinius does not support the ripper gem. The reasons for not supporting it is explained here.

rake aborted!
LoadError: no such file to load -- ripper
kernel/common/code_loader.rb:445:in `load_error'
kernel/common/code_loader.rb:429:in `resolve_require_path'
kernel/common/code_loader.rb:103:in `require'
kernel/bootstrap/rubinius.rb:127:in `synchronize'
kernel/common/code_loader.rb:102:in `require'
kernel/common/code_loader.rb:241:in `require'
kernel/common/kernel.rb:755:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/given_core-3.5.4/lib/given/line_extractor.rb:1:in `__script__'
kernel/common/code_loader.rb:247:in `require'
kernel/common/kernel.rb:755:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/given_core-3.5.4/lib/given/core.rb:7:in `__script__'
kernel/common/code_loader.rb:247:in `require'
kernel/common/kernel.rb:755:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/rspec-given-3.5.4/lib/given.rb:2:in `__script__'
kernel/common/code_loader.rb:247:in `require'
kernel/common/kernel.rb:755:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/given_core-3.5.4/lib/given/rspec/all.rb:2:in `__script__'
kernel/common/code_loader.rb:247:in `require'
kernel/common/kernel.rb:755:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/rspec-given-3.5.4/lib/rspec/given.rb:1:in `__script__'
kernel/common/code_loader.rb:247:in `require'
kernel/common/kernel.rb:755:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
/local/gsouther/.gem/rbx/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/local/gsouther/.gem/rbx/2.1.0/gems/rspec-given-3.5.4/lib/rspec-given.rb:9:in `__script__'
kernel/common/code_loader.rb:247:in `require'
kernel/common/kernel.rb:755:in `require'
/local/gsouther/tools/rubinius/gems/gems/bundler-1.7.7/lib/bundler/runtime.rb:76:in `require'
kernel/bootstrap/array.rb:76:in `each'
/local/gsouther/tools/rubinius/gems/gems/bundler-1.7.7/lib/bundler/runtime.rb:72:in `require'
kernel/bootstrap/array.rb:76:in `each'
/local/gsouther/tools/rubinius/gems/gems/bundler-1.7.7/lib/bundler/runtime.rb:61:in `require'
/local/gsouther/tools/rubinius/gems/gems/bundler-1.7.7/lib/bundler.rb:133:in `require'
/local/gsouther/benchmarks/discourse/config/application.rb:15:in `__script__'
kernel/common/code_loader.rb:247:in `require'
kernel/common/kernel.rb:755:in `require'
/local/gsouther/benchmarks/discourse/Rakefile:5:in `__script__'
kernel/common/kernel.rb:497:in `load'
kernel/common/kernel.rb:497:in `load'
kernel/delta/code_loader.rb:66:in `load_script'
kernel/delta/code_loader.rb:152:in `load_script'
kernel/loader.rb:645:in `script'
kernel/loader.rb:799:in `main'
(See full trace by running task with --trace)

It looks like the rspec-given gem is what is using ripper and it appears that it does not support Rubinius (look here and search for Rubinius):

Currently Ripper is not supported on Rubinius and versions of JRuby prior to JRuby-1.7.5.

If you want to use a version of Ruby that does not support Ripper, then natural assertions will disabled. In addition, you should also disable source caching in the configuration (see the configuration section below).

Having gotten this far I figured I would ask on the forum to see if anyone else has tried to use Rubinius. Does anyone have thoughts on modifying the settings for rspec-given so that it does not try to use the features that require ripper.

Alternatively is there a way to install Discourse that will skip the dependency on rspec-given? I only want to use Rubinius with Discourse for benchmarking, so if some of the tests or other features don’t run that is okay for me as long as the benchmarks do.


(Sam Saffron) #2

I am fine porting us off rspec-given, it was an experiment. PR is welcome.

Pop by http://community.rubybench.org/ to tell us your plans here and maybe get stuff into rubybench eventually.


(Erlend Sogge Heggen) #3

Did you ever make any further headway on this?