Project

General

Profile

Actions

Bug #18400

closed

Cannot require 'prime' in irb @ 3.1.0.preview1

Added by chooosen (Piotr Wasiak) almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 3.1.0preview1 (2021-11-09 master 5a3b2e6141) [x86_64-darwin20]
[ruby-core:106598]

Description

Description

If I run ruby script.rb with require 'prime' then it will work fine.

But after entering irb, I can require 'net/http' , but with prime I get following error.
Problem occurs with:

The following default gems are now bundled gems.
net-ftp
net-imap
net-pop
net-smtp
matrix
prime

How to reproduce

Install ruby 2.3.0.preview1

>  bundle -v
Bundler version 2.3.0.dev
> bundle exec irb
irb(main):001:0> require 'prime'

The same was on bundler 2.2.33

Expected result

prime bundled with ruby gem is loaded.

true

Actual result¶

(irb):1:in `require': cannot load such file -- prime (LoadError)
	from (irb):1:in `<main>'
	from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/gems/3.1.0/gems/irb-1.3.8.pre.11/exe/irb:11:in `<top (required)>'
	from /Users/user/.rbenv/versions/3.1.0-preview1/bin/irb:25:in `load'
	from /Users/user/.rbenv/versions/3.1.0-preview1/bin/irb:25:in `<top (required)>'
	from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `load'
	from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `kernel_load'
	from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/cli/exec.rb:23:in `run'
	from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/cli.rb:478:in `exec'
	from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/cli.rb:31:in `dispatch'
	from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/cli.rb:25:in `start'
	from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/gems/3.1.0/gems/bundler-2.3.0.dev/libexec/bundle:49:in `block in <top (required)>'
	from /Users/user/.rbenv/versions/3.1.0-preview1/lib/ruby/3.1.0/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	... 3 levels...
Actions #1

Updated by chooosen (Piotr Wasiak) almost 3 years ago

  • Description updated (diff)

Updated by hsbt (Hiroshi SHIBATA) almost 3 years ago

  • Subject changed from Cannot require 'prime' in irb @ 2.3.0.preview1 to Cannot require 'prime' in irb @ 3.1.0.preview1
  • Status changed from Open to Assigned
  • Assignee set to hsbt (Hiroshi SHIBATA)

Updated by hsbt (Hiroshi SHIBATA) almost 3 years ago

You should add prime into your Gemfile for using prime via bundler environment.

Updated by chooosen (Piotr Wasiak) almost 3 years ago

hsbt (Hiroshi SHIBATA) wrote in #note-3:

You should add prime into your Gemfile for using prime via bundler environment.

Thanks for the hint, it resolves issue fully.

Can be closed.

Actions #5

Updated by hsbt (Hiroshi SHIBATA) almost 3 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0