Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"RegexpError: invalid multibyte escape" error on "rake generate_secret_token" and "rake db:migrate" Rails commands #1433

Closed
JongleurX opened this issue Sep 29, 2018 · 12 comments
Assignees
Milestone

Comments

@JongleurX
Copy link

JongleurX commented Sep 29, 2018

In trying to test TruffleRuby with the Redmine (a popular project-management tool), I found two rake commands gem (rake generate_secret_token and rake db:migrate) that generate errors under Rails 4.2.10.

Environment

Name Value
OS Ubuntu 18.04.1 LTS
TruffleRuby CE 1.0.0-rc6 (installed manually) and CE 1.0.0-rc7
Gemfile Redmine 3.4-stable

Repro steps

  1. Download graalvm-ce-1.0.0-rc6 or graalvm-ce-1.0.0-rc7 manually and extract it.
  2. Run the commands below (approximation based on .bash_history).
jeremy@Ubuntu:~$ sudo apt install curl subversion postgresql postgresql-contrib llvm libssl zlib make clang libc++-dev libc++abi-dev libssl-dev libz-dev libxml2-dev pkg-config
jeremy@Ubuntu:~$ export PATH=/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin:$PATH
jeremy@Ubuntu:~$ gu install ruby
jeremy@Ubuntu:~$ svn co https://svn.redmine.org/redmine/branches/3.4-stable redmine-3.4
jeremy@Ubuntu:~$ cd redmine-3.4
jeremy@Ubuntu:~/redmine-3.4$ cp -pR config/database.yml.example config/database.yml
jeremy@Ubuntu:~/redmine-3.4$ vi config/database.yml ## edit adapters to use postgresql
jeremy@Ubuntu:~/redmine-3.4$ gem install bundler
jeremy@Ubuntu:~/redmine-3.4$ bundle config build.nokogiri --use-system-libraries
jeremy@Ubuntu:~/redmine-3.4$ bundle install
jeremy@Ubuntu:~/redmine-3.4$ bundle exec rake generate_secret_token
jeremy@Ubuntu:~/redmine-3.4$ RAILS_ENV=development bundle exec rake db:migrate

Errors

  • The bundle exec rake generate_secret_token command failed with an RegexpError: invalid multibyte escape error.
  • The bundle exec rake db:migrate command also failed with an RegexpError: invalid multibyte escape error.

Details

Click below to see the full stack traces for each errors.

bundle exec rake generate_secret_token

jeremy@UchiBuntu2:~/Coding/Rails/redmine-3.4$ bundle exec rake generate_secret_token
Possibly unsupported Ruby implementation
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'roadie-rails'.
Gem Load Error is: invalid multibyte escape
Backtrace for gem load error is:
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `initialize'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `new'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `CssParser'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:1:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser.rb:11:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser.rb:11:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie/inliner.rb:4:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie/inliner.rb:4:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie.rb:29:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie.rb:29:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:81:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:76:in `each'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:76:in `block in require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:65:in `each'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:65:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler.rb:114:in `require'
/home/jeremy/Coding/Rails/redmine-3.4/config/application.rb:5:in `<top (required)>'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `require'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:703:in `raw_load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:104:in `block in load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:103:in `load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:82:in `block in run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/rake:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/rake:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/rake:23:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:74:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:74:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:74:in `kernel_load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:28:in `run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli.rb:424:in `exec'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `__send__'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli.rb:27:in `dispatch'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli.rb:18:in `start'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/exe/bundle:30:in `block in <top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/exe/bundle:22:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `<main>'
Bundler Error Backtrace:
/home/jeremy/Coding/Rails/redmine-3.4/config/application.rb:5:in `<top (required)>'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `require'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `<main>'

Caused by:
RegexpError: invalid multibyte escape
/home/jeremy/Coding/Rails/redmine-3.4/config/application.rb:5:in `<top (required)>'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `require'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)

bundle exec rake db:migrate

jeremy@UchiBuntu2:~/Coding/Rails/redmine-3.4$ RAILS_ENV=development bundle exec rake db:migrate
Possibly unsupported Ruby implementation
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'roadie-rails'.
Gem Load Error is: invalid multibyte escape
Backtrace for gem load error is:
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `initialize'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `new'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `CssParser'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:1:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser.rb:11:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser.rb:11:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie/inliner.rb:4:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie/inliner.rb:4:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie.rb:29:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie.rb:29:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:81:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:76:in `each'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:76:in `block in require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:65:in `each'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:65:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler.rb:114:in `require'
/home/jeremy/Coding/Rails/redmine-3.4/config/application.rb:5:in `<top (required)>'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `require'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:703:in `raw_load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:104:in `block in load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:103:in `load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:82:in `block in run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/rake:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/rake:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/rake:23:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:74:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:74:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:74:in `kernel_load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli/exec.rb:28:in `run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli.rb:424:in `exec'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `__send__'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli.rb:27:in `dispatch'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/cli.rb:18:in `start'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/exe/bundle:30:in `block in <top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.5/exe/bundle:22:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `<main>'
Bundler Error Backtrace:
/home/jeremy/Coding/Rails/redmine-3.4/config/application.rb:5:in `<top (required)>'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `require'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `<main>'

Caused by:
RegexpError: invalid multibyte escape
/home/jeremy/Coding/Rails/redmine-3.4/config/application.rb:5:in `<top (required)>'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `require'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc6/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)

@JongleurX
Copy link
Author

I tried again using 1.0.0-rc7, and got a bit further, but this is stills problematic.

I found a Stack discussion that gave me a hint. Redmine's Gemfile limits the platforms for which the pg gem is installed to mri, mingw, and x64_ming2. As a result, it doesn't automatically install the pg gem when using TruffleRuby. So I installed it manually, but still no dice.

$ curl -LOk https://github.com/oracle/truffleruby/releases/download/vm-1.0.0-rc7/truffleruby-1.0.0-rc7-linux-amd64.tar.gz
$ tar xf truffleruby-1.0.0-rc7-linux-amd64.tar.gz
$ export PATH=/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/bin:$PATH
$ gu install ruby
$ /home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/truffle/post_install_hook.sh
$ /home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/bin/gu rebuild-images ruby polyglot
$ cd redmine-3.4
$ gem install bundler
$ bundle config build.nokogiri --use-system-libraries
$ bundle install      # this process is very slow before "Fetching gem metadata..." is displayed
$ sudo apt install postgresql-server-dev-10 libpq-dev
$ gem install pg
$ bundle exec rake generate_secret_token --trace
$ RAILS_ENV=development bundle exec rake db:migrate

Below is the full stack trace for the failed generate_secret_token rake task.

$ bundle exec rake generate_secret_token --trace
Possibly unsupported Ruby implementation
rake aborted!
RegexpError: invalid multibyte escape
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `compile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `initialize'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `new'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `CssParser'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:1:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser.rb:11:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser.rb:11:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie/inliner.rb:4:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie/inliner.rb:4:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie.rb:29:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie.rb:29:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:81:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:76:in `each'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:76:in `block in require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:65:in `each'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:65:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler.rb:114:in `require'
/home/jeremy/Coding/Rails/redmine-3.4/config/application.rb:5:in `<top (required)>'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `require'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:703:in `raw_load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:104:in `block in load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:103:in `load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:82:in `block in run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/bin/rake:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/bin/rake:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/bin/rake:23:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli/exec.rb:74:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli/exec.rb:74:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli/exec.rb:74:in `kernel_load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli/exec.rb:28:in `run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli.rb:424:in `exec'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `__send__'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli.rb:27:in `dispatch'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli.rb:18:in `start'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/exe/bundle:30:in `block in <top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/exe/bundle:22:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/bin/bundle:23:in `<main>'

I could work around this by creating a config/secrets.yml file per the Rails docs, generating my own 64-character random hex string using IRB, and exporting that value as the SECRET_KEY_BASE environment variable in my bash .profile.

However, I couldn't work around the failed db:migrate rake task.

$ RAILS_ENV=development bundle exec rake db:migrate --trace
Possibly unsupported Ruby implementation
rake aborted!
RegexpError: invalid multibyte escape
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `compile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `initialize'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `new'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `CssParser'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:1:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser.rb:11:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/css_parser-1.6.0/lib/css_parser.rb:11:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie/inliner.rb:4:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie/inliner.rb:4:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie.rb:29:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-3.2.2/lib/roadie.rb:29:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:81:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:76:in `each'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:76:in `block in require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:65:in `each'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:65:in `require'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler.rb:114:in `require'
/home/jeremy/Coding/Rails/redmine-3.4/config/application.rb:5:in `<top (required)>'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `require'
/home/jeremy/Coding/Rails/redmine-3.4/Rakefile:5:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:703:in `raw_load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:104:in `block in load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:103:in `load_rakefile'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:82:in `block in run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/bin/rake:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/bin/rake:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/bin/rake:23:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli/exec.rb:74:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli/exec.rb:74:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli/exec.rb:74:in `kernel_load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli/exec.rb:28:in `run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli.rb:424:in `exec'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `__send__'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli.rb:27:in `dispatch'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/cli.rb:18:in `start'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/exe/bundle:30:in `block in <top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/jre/languages/ruby/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/exe/bundle:22:in `<top (required)>'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/bin/bundle:23:in `load'
/home/jeremy/Coding/Rails/graalvm-ce-1.0.0-rc7/bin/bundle:23:in `<main>'

@chrisseaton
Copy link
Collaborator

Thanks we'll be looking into this.

@eregon eregon added the bug label Oct 30, 2018
@JongleurX
Copy link
Author

JongleurX commented Feb 10, 2019

This issue has been open for a while, so I thought I'd give try the process again with the latest bits.

I tried again, using Ubuntu 18.04.2 LTS and TruffleRuby 1.0.0-rc10, installed with RVM, and Redmine 4.0 stable. Initially, I couldn't install the nokogiri gem. I had attempted to install it using the system libraries as documented (e.g. in #62), so I removed 1.0.0-rc10 and downloaded 1.0.0-rc12 CE from the GitHub releases page.

With RC12, I got a super ugly core dump (SubstrateSegfaultHandler caught signal 11) when bundler was installing gems. I think it was when it was attempting to install railties 5.2.2. I'd love to attach the dump, but I'm having some issues copying data from my VM. Anyway, trying again got further -- seems like I was just running low on memory, a ZLib::MemError: insufficient memory warning appeared when installing native C extensions for ffi 1.1.0.0.

So I gave my VM a bit more memory, and tried again. At the end of all this, the RexexpError: invalid multibyte escape issue still existed for both the generate_secret_token rake command and the db:migrate rake command.

@chrisseaton
Copy link
Collaborator

Yes we've got a bit behind on our public issues, sorry about that. Thanks for trying again.

@JongleurX
Copy link
Author

Hey Chris and team, just wondering if this fix is on the roadmap, and roughly speaking when you think you’ll be able to support most production Rails apps.

@chrisseaton
Copy link
Collaborator

chrisseaton commented Apr 17, 2019

We've been making a bit dent in the issue backlog in the last few weeks, so we're making progress.

I'll prioritise this one.

I'm not sure Redmine is in our testing system yet - I'll put it in and see how it goes. If you have any other Gemfile.lock files you can freely send us we can test those as well - that's more specific than aiming at 'most production Rails apps' which is still a bit ambitious at this point.

@JongleurX
Copy link
Author

@chrisseaton, any progress to report after Redmine was added to your testing system?

@chrisseaton
Copy link
Collaborator

Sorry, I left Oracle. @eregon can task someone else. I'd help you myself still, but this seems fairly complicated to setup and test.

@eregon eregon self-assigned this Oct 7, 2019
@eregon
Copy link
Member

eregon commented Oct 7, 2019

We'll try to take a look soon at the cause of this.
It seems the RegexpError happens in the css_parser 1.6.0 gem, and is actually very easy to reproduce (on TruffleRuby 19.2.0.1):

$ gem install css_parser -v 1.6.0
$ ruby -rcss_parser -e0
/home/eregon/.rubies/truffleruby-19.2.0.1/lib/gems/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `compile': invalid multibyte escape (RegexpError)
	from /home/eregon/.rubies/truffleruby-19.2.0.1/lib/gems/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `initialize'
	from /home/eregon/.rubies/truffleruby-19.2.0.1/lib/gems/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `new'
	from /home/eregon/.rubies/truffleruby-19.2.0.1/lib/gems/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:9:in `CssParser'
	from /home/eregon/.rubies/truffleruby-19.2.0.1/lib/gems/gems/css_parser-1.6.0/lib/css_parser/regexps.rb:1:in `<top (required)>'
	from /home/eregon/.rubies/truffleruby-19.2.0.1/lib/mri/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /home/eregon/.rubies/truffleruby-19.2.0.1/lib/mri/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /home/eregon/.rubies/truffleruby-19.2.0.1/lib/gems/gems/css_parser-1.6.0/lib/css_parser.rb:11:in `<top (required)>'
	from /home/eregon/.rubies/truffleruby-19.2.0.1/lib/mri/rubygems/core_ext/kernel_require.rb:130:in `require'
	from /home/eregon/.rubies/truffleruby-19.2.0.1/lib/mri/rubygems/core_ext/kernel_require.rb:130:in `require'
	from -e:1:in `require'
	from -e:1:in `<main>'

It also happens with css_parser 1.7.0, the latest version at the time of writing.

@eregon eregon assigned aardvark179 and unassigned eregon Oct 7, 2019
@JongleurX
Copy link
Author

Thanks! I don’t know if you are still keen to add Redmine to your test system, but it is a great example of an open-source and complex Ruby on Rails app that could benefit from TruffleRuby, particularly for larger installations with heavy usage and concurrency. Might be useful as a litmus test of TruffleRuby’s real-world readiness.

@aardvark179
Copy link
Contributor

I've found the cause of this problem and I'm running it through our internal CI at the moment. The issue was that regexps that specify NOENCODING can include escaped characters that would not be valid in the source string's original encoding.

@eregon
Copy link
Member

eregon commented Oct 19, 2019

This issue was fixed in fb3fca1 by @aardvark179 and will be in the next release. Thank you for the bug report and sorry it took so long.

@eregon eregon closed this as completed Oct 19, 2019
@eregon eregon added this to the 19.3.0 milestone Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants