-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Bundler error on 9.0.0.0 #3216
Comments
Ick, that's not good. Investigating. |
Ok, after a quick examination, it appears that an IO stream that's not writable is getting write data buffered into it somehow. When the stream goes to close, it assumes the write buffer's content means the stream is writable and proceeds to try to write; however, the write stream is null and the code blows up. I'll try to reproduce. Do you have a Gemfile that reproduces this consistently that you can share with us? |
So far I can't reproduce this with e.g. a new Rails app. I can add a safety check into the flushing logic to make sure it doesn't try to flush this stream, but I'd like to know how write data is getting into the write buffer for an unwritable stream. Hopefully you can share something with us that reproduces this. |
I've managed to (unintentionally) reproduce this whilst setting up a new Rails project on JRuby. Gemfile is just a standard one that's generated with a new Rails project on Rails version 4.1.12 with two additions to it such as the jdbc gem and warbler. I've included it here. I should point out, I did not use --deployment
Exact same thing happened.
|
I did look into this a bit before - at least it sounds familiar. the write the last line says: Set via BUNDLE_GEMFILE: "uri:classloader://Gemfile" On Thu, Aug 6, 2015 at 11:58 PM, Gordon Robert Speirs <
|
workaround for the bundler issue: remove bin/bundler from the rails application it is rvm only issue as far I can tell. the above fix solves the actual problem BUT not the error when bundler tries to update Gemfile.lock inside a classloader. |
@headius Sorry I missed the request for a gemfile. Here are the (seemingly) relevant parts. source "https://rubygems.org"
# Bundle edge Rails instead: gem "rails", github: "rails/rails"
gem "rails", "4.1.12"
platform :jruby do
gem "activerecord-jdbcpostgresql-adapter"
gem "jruby-openssl"
end
platform :ruby do
gem "concurrent-ruby-ext", "~> 0.9.0"
gem "pg"
gem "simplecov", require: false, group: :test
end
gem "concurrent-ruby", "~> 0.9.0", require: false
gem "nokogiri", require: false
source "https://rails-assets.org" do
gem "rails-assets-elasticsearch"
end
group :development do
gem "better_errors"
gem "binding_of_caller", "0.7.3.pre1"
gem "rack-mini-profiler"
end
group :development, :test do
gem "awesome_print"
gem "bundler-audit", require: false
gem "hirb"
gem "pry-rails"
gem "pry-stack_explorer"
gem "rspec-rails"
end
group :test do
gem "capybara"
gem "connection_pool"
gem "email_spec"
gem "fabrication"
gem "factory_girl_rails"
gem "poltergeist"
gem "rspec-its"
gem "shoulda-matchers", require: false
gem "timecop"
gem "vcr"
gem "webmock"
end Some random ui gems and misc are omitted for brevity. I've managed to circumvent it on docker by running: RUN echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc
RUN gem install bundler
ENV RAILS_ENV production
RUN bundle config --global --jobs 4
RUN bundle install --deployment --without test development |
@mkristian Confirmed, removing bin/bundle from the rails directory took care of the problem. Thanks so much for the workaround! |
Other workarounds include using the path to the binary The problem is not specific to RVM. Using the tarball for JRuby 9.0.0.0 from http://jruby.org/ also gives the same problem. Thanks @mkristian for the fix! |
defunct/resolved by now |
Not sure if this is a bundler or jRuby issue, but it seems like there's an issue in uri/classloader when I run
jruby -S bundle install --deployment
.The text was updated successfully, but these errors were encountered: