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

Undefined method 'multiple_choices?' , using JRuby and compat.version=2.0 #202

Closed
TheReincarnator opened this issue Apr 26, 2013 · 5 comments

Comments

@TheReincarnator
Copy link

The commit a0a07c5 breaks JRuby 2.0 with "compat.version=2.0" with HTTParty HEAD, at least in my situation, with the following error:

NameError: undefined method 'multiple_choices?' for class 'HTTParty::Response'
    alias_method at org/jruby/RubyModule.java:2270
    Response at /home/thomas/.rvm/gems/[email protected]/bundler/gems/httparty-1fde99ba8aa4/lib/httparty/response.rb:45
    HTTParty at /home/thomas/.rvm/gems/[email protected]/bundler/gems/httparty-1fde99ba8aa4/lib/httparty/response.rb:2
    (root) at /home/thomas/.rvm/gems/[email protected]/bundler/gems/httparty-1fde99ba8aa4/lib/httparty/response.rb:1
    require at org/jruby/RubyKernel.java:1027
    (root) at /home/thomas/.rvm/gems/[email protected]/bundler/gems/httparty-1fde99ba8aa4/lib/httparty.rb:1
    require at org/jruby/RubyKernel.java:1027
    (root) at /home/thomas/.rvm/gems/[email protected]/bundler/gems/httparty-1fde99ba8aa4/lib/httparty.rb:534
    each at org/jruby/RubyArray.java:1613
    (root) at /home/thomas/.rvm/gems/jruby-1.7.3@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:1
    each at org/jruby/RubyArray.java:1613
    require at /home/thomas/.rvm/gems/jruby-1.7.3@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72
    require at /home/thomas/.rvm/gems/jruby-1.7.3@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70
    require at /home/thomas/.rvm/gems/jruby-1.7.3@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59
    require at org/jruby/RubyKernel.java:1027
    require at /home/thomas/.rvm/gems/jruby-1.7.3@global/gems/bundler-1.3.5/lib/bundler.rb:132
    tap at org/jruby/RubyKernel.java:1771
    (root) at /home/thomas/work/unitymedia/ume-selfcare/config/application.rb:9
    require at org/jruby/RubyKernel.java:1027
    (root) at script/rails:6
@TheReincarnator
Copy link
Author

This is my Gemfile:

source 'https://rubygems.org'

gem 'rails'
gem 'jquery-rails'
gem 'couchmodel', :require => 'couch_model'
gem 'haml'
gem 'simple-navigation'
gem 'maruku'
gem 'will_paginate'
gem 'httparty
gem 'newrelic_rpm'

if RUBY_PLATFORM =~ /java/
  gem 'fastercsv'
  gem 'json-jruby'
  gem 'jruby-openssl', :require => false
  gem 'jruby-jars'
  gem 'activerecord-jdbc-adapter'
  gem 'activerecord-jdbcsqlite3-adapter'
  gem 'activerecord-jdbcmysql-adapter'
  gem 'jdbc-mysql'
  gem 'rubyzip', :require => 'zip/zipfilesystem'
else
  gem 'sqlite3-ruby', :require => 'sqlite3'
  gem 'mysql2'
end

group :development, :test do
  gem 'rspec-rails'
  gem 'capybara'
  gem 'capybara-webkit', :git => 'git://github.com/thoughtbot/capybara-webkit.git'
  gem 'launchy'
  gem 'spork'
  gem 'warbler'
  gem 'term-ansicolor'
  gem 'mongrel', '>= 1.2.0.pre2', :platforms => 'mri'
  gem 'pry'
  gem 'ruby-debug', :platforms => ['ruby_18', 'jruby']
  if RUBY_PLATFORM =~ /java/
    gem 'ruby-debug19', :require => 'ruby-debug', :platforms => 'ruby_19'
  else
    gem 'debugger'
  end
end

group :assets do
  gem 'sass-rails'
  gem 'yui-compressor'
  gem 'uglifier', :require => 'uglifier'
end

I am using JRuby 1.7.3, Rails 3.2.

@nixpulvis
Copy link
Contributor

Looks like JRuby 2.0 compatibility is missing the name change in Net::HTTP.
see #193 for more information.

@nixpulvis
Copy link
Contributor

Temporary fix in #204.

@nixpulvis
Copy link
Contributor

I posted this as an issue in JRuby, adding pressure to add the 2.0 stdlib. We'll have to wait to see when that gets added in. Maybe in 1.7.4 🙏

@jnunemaker
Copy link
Owner

Merged #204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants