oracle / truffleruby

A high performance implementation of the Ruby programming language, built on GraalVM.
https://www.graalvm.org/ruby/
Other
3.02k stars 185 forks source link

RUBY_ENGINE value truffleruby is not recognized #1396

Closed rsmything closed 6 years ago

rsmything commented 6 years ago

macOS 10.14 Xcode 10 Beta 4 rvm 1.29.4 (master) truffleruby-1.0.0-rc3 [ x86_64 ] (installed throw RVM) llvm@6 installed throw Brew

.ruby-version

truffleruby@project
$ export PATH="/usr/local/opt/llvm@6/bin:$PATH"
$ bundle config build.nokogiri --use-system-libraries
$ bundle
Fetching https://github.com/rails/web-console.git
Fetching https://github.com/telegram-bot-rb/telegram-bot.git
Fetching https://github.com/paypal/PayPal-Ruby-SDK.git
Fetching https://github.com/oauth-xx/oauth2.git
Fetching https://github.com/plataformatec/responders.git
Fetching https://github.com/plataformatec/devise.git
Fetching https://github.com/slim-template/slim.git
Fetching https://github.com/redis/redis-rb.git
Fetching https://github.com/elastic/elasticsearch-rails.git
Fetching https://github.com/kaminari/kaminari.git
Fetching https://github.com/mongodb/mongoid.git
[mongoid] Warning: No private key present, creating unsigned gem.
Fetching https://github.com/mongodb/mongo-ruby-driver.git
[mongo] Warning: No private key present, creating unsigned gem.
Fetching https://github.com/mongodb/bson-ruby.git
[bson] Warning: No private key present, creating unsigned gem.
Fetching https://github.com/sass/sassc-rails.git
Fetching https://github.com/Sharevari-Inc/sprockets.git
Fetching https://github.com/puma/puma.git
Fetching https://github.com/rails/rails.git
Checking out files: 100% (3679/3679), done.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...............................................................................................................................
Fetching rake 12.3.1
Installing rake 12.3.1
Fetching concurrent-ruby 1.0.5
Installing concurrent-ruby 1.0.5
Fetching i18n 1.0.1
Installing i18n 1.0.1
[ruby] PERFORMANCE keyword arguments are not yet optimized
Fetching minitest 5.11.3
Installing minitest 5.11.3
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.5
Installing tzinfo 1.2.5
Using activesupport 6.0.0.alpha from https://github.com/rails/rails.git (at master@bd139a5)
Fetching builder 3.2.3
Installing builder 3.2.3
Fetching erubi 1.7.1
Installing erubi 1.7.1
Fetching mini_portile2 2.3.0
Installing mini_portile2 2.3.0
Fetching nokogiri 1.8.4
Installing nokogiri 1.8.4 with native extensions

Fetching rails-dom-testing 2.0.3
Installing rails-dom-testing 2.0.3
Fetching crass 1.0.4
Installing crass 1.0.4
Fetching loofah 2.2.2
Installing loofah 2.2.2
Fetching rails-html-sanitizer 1.0.4
Installing rails-html-sanitizer 1.0.4
Using actionview 6.0.0.alpha from https://github.com/rails/rails.git (at master@bd139a5)
Fetching rack 2.0.5
Installing rack 2.0.5
Fetching rack-test 1.1.0
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/exceptions.rb:280: warning: already initialized constant Gem::UnsatisfiableDepedencyError
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/exceptions.rb:270: warning: previous definition of UnsatisfiableDepedencyError was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security.rb:342: warning: already initialized constant Gem::Security::DIGEST_ALGORITHM
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security.rb:342: warning: previous definition of DIGEST_ALGORITHM was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security.rb:352: warning: already initialized constant Gem::Security::DIGEST_NAME
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security.rb:350: warning: previous definition of DIGEST_NAME was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security.rb:360: warning: already initialized constant Gem::Security::KEY_ALGORITHM
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security.rb:358: warning: previous definition of KEY_ALGORITHM was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security.rb:368: warning: already initialized constant Gem::Security::KEY_LENGTH
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security.rb:366: warning: previous definition of KEY_LENGTH was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security.rb:374: warning: already initialized constant Gem::Security::KEY_CIPHER
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security.rb:372: warning: previous definition of KEY_CIPHER was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security.rb:384: warning: already initialized constant Gem::Security::ONE_YEAR
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security.rb:377: warning: previous definition of ONE_YEAR was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security.rb:394: warning: already initialized constant Gem::Security::EXTENSIONS
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security.rb:387: warning: previous definition of EXTENSIONS was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/util.rb:70: warning: already initialized constant Gem::Util::NULL_DEVICE
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/util.rb:70: warning: previous definition of NULL_DEVICE was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security/policies.rb:7: warning: already initialized constant Gem::Security::NoSecurity
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security/policies.rb:7: warning: previous definition of NoSecurity was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security/policies.rb:25: warning: already initialized constant Gem::Security::AlmostNoSecurity
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security/policies.rb:25: warning: previous definition of AlmostNoSecurity was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security/policies.rb:42: warning: already initialized constant Gem::Security::LowSecurity
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security/policies.rb:42: warning: previous definition of LowSecurity was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security/policies.rb:61: warning: already initialized constant Gem::Security::MediumSecurity
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security/policies.rb:61: warning: previous definition of MediumSecurity was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security/policies.rb:80: warning: already initialized constant Gem::Security::HighSecurity
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security/policies.rb:80: warning: previous definition of HighSecurity was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security/policies.rb:93: warning: already initialized constant Gem::Security::SigningPolicy
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security/policies.rb:93: warning: previous definition of SigningPolicy was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security/policies.rb:106: warning: already initialized constant Gem::Security::Policies
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security/policies.rb:106: warning: previous definition of Policies was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/security/trust_dir.rb:11: warning: already initialized constant Gem::Security::TrustDir::DEFAULT_PERMISSIONS
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/security/trust_dir.rb:11: warning: previous definition of DEFAULT_PERMISSIONS was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/version.rb:157: warning: already initialized constant Gem::Version::VERSION_PATTERN
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/version.rb:157: warning: previous definition of VERSION_PATTERN was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/version.rb:158: warning: already initialized constant Gem::Version::ANCHORED_VERSION_PATTERN
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/version.rb:158: warning: previous definition of ANCHORED_VERSION_PATTERN was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/requirement.rb:17: warning: already initialized constant Gem::Requirement::OPS
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/requirement.rb:25: warning: previous definition of OPS was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/requirement.rb:27: warning: already initialized constant Gem::Requirement::SOURCE_SET_REQUIREMENT
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/requirement.rb:35: warning: previous definition of SOURCE_SET_REQUIREMENT was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/requirement.rb:30: warning: already initialized constant Gem::Requirement::PATTERN_RAW
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/requirement.rb:38: warning: previous definition of PATTERN_RAW was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/requirement.rb:35: warning: already initialized constant Gem::Requirement::PATTERN
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/requirement.rb:43: warning: previous definition of PATTERN was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/requirement.rb:40: warning: already initialized constant Gem::Requirement::DefaultRequirement
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/requirement.rb:48: warning: previous definition of DefaultRequirement was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/requirement.rb:288: warning: already initialized constant Gem::Version::Requirement
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/requirement.rb:292: warning: previous definition of Requirement was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/platform.rb:198: warning: already initialized constant Gem::Platform::RUBY
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/platform.rb:198: warning: previous definition of RUBY was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/platform.rb:204: warning: already initialized constant Gem::Platform::CURRENT
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/platform.rb:204: warning: previous definition of CURRENT was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/stub_specification.rb:9: warning: already initialized constant Gem::StubSpecification::PREFIX
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/stub_specification.rb:9: warning: previous definition of PREFIX was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/stub_specification.rb:11: warning: already initialized constant Gem::StubSpecification::OPEN_MODE
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/stub_specification.rb:11: warning: previous definition of OPEN_MODE was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/stub_specification.rb:22: warning: already initialized constant Gem::StubSpecification::StubLine::NO_EXTENSIONS
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/stub_specification.rb:22: warning: previous definition of NO_EXTENSIONS was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/stub_specification.rb:25: warning: already initialized constant Gem::StubSpecification::StubLine::REQUIRE_PATHS
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/stub_specification.rb:25: warning: previous definition of REQUIRE_PATHS was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/stub_specification.rb:35: warning: already initialized constant Gem::StubSpecification::StubLine::REQUIRE_PATH_LIST
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/stub_specification.rb:35: warning: previous definition of REQUIRE_PATH_LIST was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:53: warning: already initialized constant Gem::Specification::NONEXISTENT_SPECIFICATION_VERSION
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/specification.rb:50: warning: previous definition of NONEXISTENT_SPECIFICATION_VERSION was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:76: warning: already initialized constant Gem::Specification::CURRENT_SPECIFICATION_VERSION
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/specification.rb:73: warning: previous definition of CURRENT_SPECIFICATION_VERSION was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:82: warning: already initialized constant Gem::Specification::SPECIFICATION_VERSION_HISTORY
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/specification.rb:79: warning: previous definition of SPECIFICATION_VERSION_HISTORY was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:100: warning: already initialized constant Gem::Specification::MARSHAL_FIELDS
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/specification.rb:97: warning: previous definition of MARSHAL_FIELDS was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:109: warning: already initialized constant Gem::Specification::TODAY
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/specification.rb:106: warning: previous definition of TODAY was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:111: warning: already initialized constant Gem::Specification::LOAD_CACHE
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/specification.rb:108: warning: previous definition of LOAD_CACHE was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:115: warning: already initialized constant Gem::Specification::VALID_NAME_PATTERN
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/specification.rb:112: warning: previous definition of VALID_NAME_PATTERN was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:190: warning: already initialized constant Gem::Specification::NOT_FOUND
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/specification.rb:183: warning: previous definition of NOT_FOUND was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:862: warning: already initialized constant Gem::Specification::EMPTY
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/specification.rb:843: warning: previous definition of EMPTY was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1759: warning: already initialized constant Gem::Specification::DateLike
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/specification.rb:1732: warning: previous definition of DateLike was here
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1764: warning: already initialized constant Gem::Specification::DateTimeFormat
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/mri/rubygems/specification.rb:1737: warning: previous definition of DateTimeFormat was here
NameError: undefined method `spec=' for Gem::Package::Old
An error occurred while installing rack-test (1.1.0), and Bundler cannot continue.
Make sure that `gem install rack-test -v '1.1.0' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  rails was resolved to 6.0.0.alpha, which depends on
    actioncable was resolved to 6.0.0.alpha, which depends on
      actionpack was resolved to 6.0.0.alpha, which depends on
        rack-test
$ gem install rack-test -- --use-system-libraries
Successfully installed rack-test-1.1.0
1 gem installed

$ bundle config build.nokogiri --use-system-libraries
$ bundle
RUBY_ENGINE value truffleruby is not recognized
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/gems/2.4.0/gems/bundler-1.16.3/lib/bundler/friendly_errors.rb:54:in `exit_status': undefined method `status_code' for #<Bundler::BundlerError: RUBY_ENGINE value truffleruby is not recognized>:Bundler::BundlerError (NoMethodError)
  from /Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/gems/2.4.0/gems/bundler-1.16.3/lib/bundler/friendly_errors.rb:129:in `with_friendly_errors'
  from /Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/gems/2.4.0/gems/bundler-1.16.3/exe/bundle:22:in `<top (required)>'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@global/bin/bundle:23:in `load'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@global/bin/bundle:23:in `load'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@global/bin/bundle:23:in `<main>'
eregon commented 6 years ago

Hello,

Thank you for the report. I'm confused, the issue title is RUBY_ENGINE value truffleruby is not recognized but I see no related output to that in the issue description.

The description instead shows a different error:

Fetching rack-test 1.1.0
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/ruby/site_ruby/2.4.0/rubygems/exceptions.rb:280: warning: already initialized constant Gem::UnsatisfiableDepedencyError
...
NameError: undefined method `spec=' for Gem::Package::Old
An error occurred while installing rack-test (1.1.0), and Bundler cannot continue.
Make sure that `gem install rack-test -v '1.1.0' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  rails was resolved to 6.0.0.alpha, which depends on
    actioncable was resolved to 6.0.0.alpha, which depends on
      actionpack was resolved to 6.0.0.alpha, which depends on
        rack-test
rsmything commented 6 years ago

@eregon sorry, i've updated description

eregon commented 6 years ago

@rsmything Intriguing, does it also happen on bundle install? Reinstalling Bundler (in the default instead of global gemset) might fix this, could you try gem install bundler and then bundle/bundle install ?

rsmything commented 6 years ago

@eregon

$ cd ..
$ cd project/
$ gem install bundler
Fetching: bundler-1.16.3.gem (100%)

Successfully installed bundler-1.16.3
1 gem installed

$ export PATH="/usr/local/opt/llvm@6/bin:$PATH"
$ bundle config build.nokogiri --use-system-libraries
$ bundle install
RUBY_ENGINE value truffleruby is not recognized
/Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/bundler-1.16.3/lib/bundler/friendly_errors.rb:54:in `exit_status': undefined method `status_code' for #<Bundler::BundlerError: RUBY_ENGINE value truffleruby is not recognized>:Bundler::BundlerError (NoMethodError)
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/bundler-1.16.3/lib/bundler/friendly_errors.rb:129:in `with_friendly_errors'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/bundler-1.16.3/exe/bundle:22:in `<top (required)>'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/bundle:23:in `load'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/bundle:23:in `load'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/bundle:23:in `<top (required)>'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/truffleruby_executable_hooks:24:in `eval'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/truffleruby_executable_hooks:24:in `<main>'
Fudoshiki commented 6 years ago

same issue

eregon commented 6 years ago

I cannot reproduce with 1.0.0-rc3 on Linux with chruby. Could you share your Gemfile?

Note that it's unlikely that Rails 6.0.0.alpha works out of the box.

rsmything commented 6 years ago

it works fine with ruby-2.6.0-preview2

# frozen_string_literal: true

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

# ruby '2.6'

# Full-stack web application framework.
gem 'rails', github: 'rails/rails'

# Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications
gem 'puma', github: 'puma/puma'

# Rack-based asset packaging system
gem 'sprockets', github: 'Sharevari-Inc/sprockets'
# Automatically combine media queries
gem 'sprockets-media_query_combiner'
# Adds multiple exporters to Sprockets
gem 'sprockets-exporters_pack'
# Ruby wrapper for UglifyJS JavaScript compressor
gem 'uglifier', '>= 1.3.0'
# Integrate SassC-Ruby into Rails.
gem 'sassc-rails', github: 'sass/sassc-rails'
# CoffeeScript adapter for the Rails asset pipeline.
gem 'coffee-rails', '~> 4.2'
# Minimal embedded v8 for Ruby
gem 'mini_racer'

# Ruby Implementation of the BSON specification
gem 'bson', github: 'mongodb/bson-ruby'
# Ruby driver for MongoDB
gem 'mongo', github: 'mongodb/mongo-ruby-driver'
# Elegant Persistence in Ruby for MongoDB.
gem 'mongoid', github: 'mongodb/mongoid'

# Kaminari Mongoid adapter
gem 'kaminari-mongoid'

github 'kaminari/kaminari' do
  # Kaminari's core pagination library
  gem 'kaminari-core'
  # Kaminari Action View adapter
  gem 'kaminari-actionview'
end

# A tool for truncating HTML strings efficiently
gem 'truncato'

github 'elastic/elasticsearch-rails' do
  # ActiveModel/Record integrations for Elasticsearch.
  gem 'elasticsearch-model'
  # Ruby on Rails integrations for Elasticsearch.
  gem 'elasticsearch-rails'
end

# A Ruby client library for Redis
gem 'redis', github: 'redis/redis-rb', require: %w[redis redis/connection/hiredis]
# Ruby wrapper for hiredis (protocol serialization/deserialization and blocking I/O)
gem 'hiredis', '~> 0.6'

# Whitespace cleanup for ActiveModel attributes
gem 'strip_attributes'
# Gives you a country object full of all sorts of useful information.
gem 'countries', require: 'countries/global'
# Country Select Plugin
gem 'country_select', require: 'country_select_without_sort_alphabetical'
# Simple list of cities and states of the world
gem 'city-state'
# Rails engine for cache-friendly, client-side local time
gem 'local_time'

# C extensions to optimize concurrent-ruby under MRI.
gem 'concurrent-ruby-ext'
# FFast String blank? implementation
gem 'fast_blank'
# A fast JSON parser and serializer.
gem 'oj'

# Some [hopefully] useful extensions to Ruby's String class
gem 'stringex', require: false

# Slim is a template language.
gem 'slim', github: 'slim-template/slim'

# Flexible authentication solution for Rails with Warden
gem 'devise', github: 'plataformatec/devise'
# A set of Rails responders to dry up your application
gem 'responders', github: 'plataformatec/responders'

# A Ruby wrapper for the OAuth 2.0 protocol.
gem 'oauth2', github: 'oauth-xx/oauth2'
# Facebook OAuth2 Strategy for OmniAuth
gem 'omniauth-facebook'
# A Google OAuth2 strategy for OmniAuth 1.x
gem 'omniauth-google-oauth2'

# The PayPal REST SDK provides Ruby APIs to create, process and manage payment.
gem 'paypal-sdk-rest', github: 'paypal/PayPal-Ruby-SDK'
# Ruby bindings for the Stripe API
gem 'stripe'

# Library for building Telegram Bots with Rails integration
gem 'telegram-bot', github: 'telegram-bot-rb/telegram-bot'
# Allows access to the Discourse API
gem 'discourse_api'

group :development, :test do
  # A iterations per second enhancement to Benchmark.
  gem 'benchmark-ips', require: false
  # Boot large ruby/rails apps faster
  gem 'bootsnap', '>= 1.1.0', require: false
  # Ruby fast debugger - base + CLI
  gem 'byebug'

  # Code smell detector for Ruby
  gem 'reek', require: false
  # Automatic Ruby code style checking tool.
  gem 'rubocop', require: false
end

group :development do
  # Bundler support for Capistrano 3.x
  gem 'capistrano-bundler', require: false
  # Puma integration for Capistrano
  gem 'capistrano3-puma', require: false
  # Rails specific Capistrano tasks
  gem 'capistrano-rails', '~> 1.3', require: false
  # RVM integration for Capistrano
  gem 'capistrano-rvm', require: false

  # Ruby gem for colorizing text using ANSI escape sequences.
  gem 'colorize'

  # Listen to file modifications
  gem 'listen', '>= 3.0.5', '< 3.2'
  # A debugging tool for your Ruby on Rails applications.
  gem 'web-console', github: 'rails/web-console'
  # Rails application preloader
  gem 'spring'
  # Makes spring watch files using the listen gem.
  gem 'spring-watcher-listen', '~> 2.0.0'
end

group :test do
  # Capybara aims to simplify the process of integration testing Rack applications, such as Rails, Sinatra or Merb
  gem 'capybara', '>= 2.15'
  # The next generation developer focused tool for automated testing of webapps
  gem 'selenium-webdriver'
  # Easy installation and use of chromedriver.
  gem 'chromedriver-helper'

  # factory_bot_rails provides integration between factory_bot and rails 3 or newer
  gem 'factory_bot_rails'
  # Ffaker generates dummy data.
  gem 'ffaker'
end
rsmything commented 6 years ago

I've reproduced again with bundle -V and clean gemset

$ rmv use truffleruby@global
$ gem update --system
$ gem update
$ gem install bundler nokogiri -- --use-system-libraries

$ rvm gemset delete project
$ rvm cleanup all
Cleaning up rvm archives
Cleaning up rvm repos
Cleaning up rvm src
Cleaning up rvm log
Cleaning up rvm tmp
Cleaning up rvm gemsets
Cleaning up rvm links
Cleanup done.

.ruby-version

truffleruby@project
$ cd project/
$ rm .Gemfile.lock
truffleruby-1.0.0-rc3 - #gemset created /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project
truffleruby-1.0.0-rc3 - #generating project wrappers.........

$ rvm use truffleruby@project
Using /Users/User/.rvm/gems/truffleruby-1.0.0-rc3 with gemset project

$ gem install bundler nokogiri -- --use-system-libraries
Fetching: bundler-1.16.3.gem (100%)
Successfully installed bundler-1.16.3
Fetching: nokogiri-1.8.4.gem (100%)
[ruby] PERFORMANCE keyword arguments are not yet optimized
Building native extensions with: '--use-system-libraries'
This could take a while...
Successfully installed nokogiri-1.8.4
2 gems installed
$ $PATH
-bash: /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin:/Users/User/.rvm/gems/truffleruby-1.0.0-rc3@global/bin:/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/bin:/Users/User/.rvm/bin:/usr/local/opt/llvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin: No such file or directory
$ bundle install -V
Running `bundle install --verbose` with bundler 1.16.3
Fetching https://github.com/rails/rails.git
Fetching https://github.com/puma/puma.git
Fetching https://github.com/Sharevari-Inc/sprockets.git
Fetching https://github.com/sass/sassc-rails.git
Fetching https://github.com/mongodb/bson-ruby.git
[bson] Warning: No private key present, creating unsigned gem.
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It will be removed on or after 2018-12-01.
Gem::Specification#has_rdoc= called from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bundler/gems/bson-ruby-27c1fee8bf5c/bson.gemspec:39.
Fetching https://github.com/mongodb/mongo-ruby-driver.git
[mongo] Warning: No private key present, creating unsigned gem.
Fetching https://github.com/mongodb/mongoid.git
[mongoid] Warning: No private key present, creating unsigned gem.
Fetching https://github.com/kaminari/kaminari.git
Fetching https://github.com/elastic/elasticsearch-rails.git
Fetching https://github.com/redis/redis-rb.git
Fetching https://github.com/slim-template/slim.git
Fetching https://github.com/plataformatec/devise.git
Fetching https://github.com/plataformatec/responders.git
Fetching https://github.com/oauth-xx/oauth2.git
Fetching https://github.com/paypal/PayPal-Ruby-SDK.git
Fetching https://github.com/telegram-bot-rb/telegram-bot.git
Fetching https://github.com/rails/web-console.git
RUBY_ENGINE value truffleruby is not recognized
/Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/bundler-1.16.3/lib/bundler/friendly_errors.rb:54:in `exit_status': undefined method `status_code' for #<Bundler::BundlerError: RUBY_ENGINE value truffleruby is not recognized>:Bundler::BundlerError (NoMethodError)
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/bundler-1.16.3/lib/bundler/friendly_errors.rb:129:in `with_friendly_errors'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/bundler-1.16.3/exe/bundle:22:in `<top (required)>'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/bundle:23:in `load'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/bundle:23:in `load'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/bundle:23:in `<top (required)>'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/truffleruby_executable_hooks:24:in `eval'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/truffleruby_executable_hooks:24:in `<main>'
rsmything commented 6 years ago

i've commented all gems in the Gemfile and got the same ERROR. Some error with the bundler, I suppose

$ bundle
The Gemfile specifies no dependencies
RUBY_ENGINE value truffleruby is not recognized
/Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/bundler-1.16.3/lib/bundler/friendly_errors.rb:54:in `exit_status': undefined method `status_code' for #<Bundler::BundlerError: RUBY_ENGINE value truffleruby is not recognized>:Bundler::BundlerError (NoMethodError)
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/bundler-1.16.3/lib/bundler/friendly_errors.rb:129:in `with_friendly_errors'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/bundler-1.16.3/exe/bundle:22:in `<top (required)>'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/bundle:23:in `load'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/bundle:23:in `load'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/bundle:23:in `<top (required)>'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/truffleruby_executable_hooks:24:in `eval'
  from /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/bin/truffleruby_executable_hooks:24:in `<main>'
eregon commented 6 years ago

@rsmything Thank you for providing the Gemfile. I tried locally with your provided Gemfile and chruby and could unfortunately not reproduce.

$ gem update --system
$ gem update

This is probably what causes RUBY_ENGINE value truffleruby is not recognized. We expect RubyGems to be the version we ship, and not anything else. Does it work if you reinstall TruffleRuby with RVM and do not update RubyGems?

Found changes from the lockfile, re-resolving dependencies because the list of sources changed, the dependencies in your gemfile changed, you added a new platform to your gemfile

Could you also provide your Gemfile.lock (e.g., in a gist) to reproduce this error?

rsmything commented 6 years ago

I've deleted Gemfile.lock. New Gemfile.lock don't appear when i try to execute a bundle. But i can to attach Gemfile.lock after completed bundle with 2.6 @eregon

rsmything commented 6 years ago

I will try now to delete truffleruby with all gemsets and reinstall again without gem update --system/gem update

eregon commented 6 years ago

To get at least some basic things working for both of us, this works for me with RVM on Linux:

$ rvm install truffleruby
$ rvm use truffleruby
$ gem install bundler
$ bundle install 
Fetching gem metadata from https://rubygems.org/...............
Resolving dependencies...
Using bundler 1.16.3
Using rack 2.0.5
Using rack-test 1.1.0
Bundle complete! 1 Gemfile dependency, 3 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

with Gemfile:

source 'https://rubygems.org'

gem 'rack-test'
rsmything commented 6 years ago

i'll test now this Gemfile

rsmything commented 6 years ago

@eregon it works if i follow step by step with your instructions

rsmything commented 6 years ago

I will test with .ruby-version file and gemset

rsmything commented 6 years ago

@eregon thank you, it seems problem related with gem update/gem update --system

Can you prompt how to fix this problem with ruby.h? https://github.com/miyucy/brotli/blob/master/ext/brotli/brotli.h

Fetching brotli 0.2.0
Installing brotli 0.2.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/brotli-0.2.0/ext/brotli
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/bin/truffleruby -r ./siteconf20180725-79364-nbhhv4.rb extconf.rb
creating Makefile
cp -r /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/brotli-0.2.0/vendor/brotli/c/enc /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/brotli-0.2.0/ext/brotli
cp -r /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/brotli-0.2.0/vendor/brotli/c/dec /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/brotli-0.2.0/ext/brotli
cp -r /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/brotli-0.2.0/vendor/brotli/c/common /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/brotli-0.2.0/ext/brotli
cp -r /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/brotli-0.2.0/vendor/brotli/c/include /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/brotli-0.2.0/ext/brotli

current directory: /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/brotli-0.2.0/ext/brotli
make "DESTDIR=" clean

current directory: /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/brotli-0.2.0/ext/brotli
make "DESTDIR="
clang  -Xclang -disable-O0-optnone -g -Wimplicit-function-declaration -Wno-unknown-warning-option -Wno-int-conversion -Wno-int-to-pointer-cast -Wno-unused-value -Wno-incompatible-pointer-types -ferror-limit=500 -c
-emit-llvm  -DOS_MACOSX  -c -o brotli.o brotli.c
In file included from brotli.c:1:
./brotli.h:4:10: fatal error: 'ruby.h' file not found
#include "ruby.h"
         ^~~~~~~~
1 error generated.
make: *** [brotli.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/gems/brotli-0.2.0 for inspection.
Results logged to /Users/User/.rvm/gems/truffleruby-1.0.0-rc3@project/extensions/x86_64-darwin/2.4.0/brotli-0.2.0/gem_make.out

An error occurred while installing brotli (0.2.0), and Bundler cannot continue.
Make sure that `gem install brotli -v '0.2.0' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  sprockets-exporters_pack was resolved to 0.1.2, which depends on
    brotli
$ sudo find / -type f -name ruby.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/Headers/ruby.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/Headers/ruby/ruby.h

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby.h
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h
/System/Library/Frameworks/Ruby.framework/Versions/2.3/Headers/ruby.h
/System/Library/Frameworks/Ruby.framework/Versions/2.3/Headers/ruby/ruby.h

/Users/User/.rvm/rubies/ruby-2.6.0-preview2/include/ruby-2.6.0/ruby.h
/Users/User/.rvm/rubies/ruby-2.6.0-preview2/include/ruby-2.6.0/ruby/ruby.h

/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/cext/include/ruby.h
/Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/cext/include/ruby/ruby.h
rsmything commented 6 years ago

I'll create another one issue with wrong $PATH without /Users/User/.rvm/rubies/truffleruby-1.0.0-rc3/lib/cext/include/ruby.h

@eregon Current issue solved, thank you

eregon commented 6 years ago

@rsmything Great! We should probably add a warning/confirmation that gem update --system doesn't work in TruffleRuby right now.

Please file a separate issue for brotli as you mention, that will make it easier to track.