Closed rsmything closed 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
@eregon sorry, i've updated description
@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
?
@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>'
same issue
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.
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
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>'
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>'
@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?
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
I will try now to delete truffleruby with all gemsets and reinstall again without gem update --system/gem update
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'
i'll test now this Gemfile
@eregon it works if i follow step by step with your instructions
I will test with .ruby-version file and gemset
@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
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
@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.
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