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

Rake console gives "LoadError: cannot load such file -- ubygems" #8199

iBug opened this issue May 22, 2020 · 3 comments · Fixed by #8312

Rake console gives "LoadError: cannot load such file -- ubygems" #8199

iBug opened this issue May 22, 2020 · 3 comments · Fixed by #8312
frozen-due-to-age has-pull-request


Copy link

iBug commented May 22, 2020

My Environment

Software Version(s)
Operating System Ubuntu 20.04 LTS
jekyll master / 2e80c55
github-pages Not applicable


Running bundle exec rake console on project root emits a warning:

/usr/lib/ruby/2.7.0/irb/init.rb:290: warning: LoadError: cannot load such file -- ubygems

The offending line is this:


Line 162 in 2e80c55

sh "irb -rubygems -r ./lib/#{name}.rb"

The last commit to Rakefile is nearly 3 years old and I couldn't find the documentation for IRB at that time. What I can find now is that IRB only supports -r <library> but no option that looks like rubygems. This makes IRB parse -rubygems as -r ubygems and emit this warning.

I think it's straight enough to remove this outdated CLI option from Rakefile, but I feel that the original maintainers may have more background on this.

- sh "irb -rubygems -r ./lib/#{name}.rb"
+ sh "irb -r ./lib/#{name}.rb"
Copy link

jekyllbot commented Jul 22, 2020

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the latest 3.x-stable or master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider building it first as a plugin. Jekyll 3 introduced hooks which provide convenient access points throughout the Jekyll build pipeline whereby most needs can be fulfilled. If this is something that cannot be built as a plugin, then please provide more information about why in order to keep this issue open.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyllbot jekyllbot added the stale label Jul 22, 2020
Copy link
Contributor Author

iBug commented Jul 22, 2020

Someone check this issue?

@jekyllbot jekyllbot removed the stale label Jul 22, 2020
Copy link

ashmaroli commented Jul 22, 2020

@iBug Feel free to open a pull request with the patch you've suggested in the opening post.
There is no need to explicitly load Rubygems in modern Ruby versions. So its a 👍

@jekyllbot jekyllbot added the has-pull-request label Jul 23, 2020
jekyllbot pushed a commit that referenced this issue Jul 23, 2020
@jekyll jekyll locked and limited conversation to collaborators Jul 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
frozen-due-to-age has-pull-request
None yet

Successfully merging a pull request may close this issue.

3 participants