Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6850549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:08:17+00:00 2026-05-27T01:08:17+00:00

irb(main):001:0> test = (0/1).rationalize => (0/1) irb(main):002:0> test.to_i NoMethodError: undefined method `to_i’ for (0/1):Rational

  • 0
irb(main):001:0> test = (0/1).rationalize
=> (0/1)
irb(main):002:0> test.to_i
NoMethodError: undefined method `to_i' for (0/1):Rational
        from (irb):2:in `evaluate'
        from org/jruby/RubyKernel.java:1093:in `eval'
        from org/jruby/RubyKernel.java:1419:in `loop'
        from org/jruby/RubyKernel.java:1205:in `catch'
        from org/jruby/RubyKernel.java:1205:in `catch'
        from C:\Development\jruby-1.6.4\bin\irb:13:in `(root)'
irb(main):003:0>

This works in JRuby 1.6.4 when installed normally, but after having built from source I get the error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:08:18+00:00Added an answer on May 27, 2026 at 1:08 am

    This is a bug in JRuby.

    https://jira.codehaus.org/browse/JRUBY-6142

    The ticket includes a fix but it has not been merged.

    If like me, you were only encountering this problem when installing gems, try making sure you aren’t running with the –debug flag. If you’re having this problem using a JRuby installation you built from source, try the precompiled version from the website.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Ruby, I can define a method foo=(bar) : irb(main):001:0> def foo=(bar) irb(main):002:1> p
irb(main):001:0> require 'active_support' => true irb(main):002:0> require 'active_support/inflector/inflections' => true irb(main):003:0> ActiveSupport::Inflector.pluralize('test') => test
Some interesting output from irb: irb(main):001:0> Class.ancestors => [Class, Module, Object, Kernel, BasicObject] irb(main):002:0>
C:\>irb irb(main):001:0> s = Proc.new { puts Hello } => #<Proc:0x04051780@(irb):1> irb(main):002:0> s.call Hello
Can i do editing in the irb shell ? irb(main):001:0> class MyClass irb(main):002:1> def
Consider the following: irb(main):001:0> class A irb(main):002:1> def initialize irb(main):003:2> @string = my string
I've been trying the String#truncate method provided by Rails 3: irb(main):001:0> abcde.truncate(1) => abc...
I'm trying compass in irb, this is my code: C:\Documents and Settings\test>irb irb(main):001:0> require
Here's my irb session: irb(main):001:0> class User irb(main):002:1> include MongoMapper::Document irb(main):003:1> key :name, String
What is happening here?? irb(main):001:0> a= nil => nil irb(main):002:0> b = nil =>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.