Ruby 1.9.2-p290 通过 rbenv 产生来自 psych-1.2.1 的警告:VERSION 和 LIBYAML_VERSION

发布于 2024-12-04 22:12:27 字数 293 浏览 5 评论 0原文

当我运行 ruby​​ 时,我收到以下警告:

~/.gem/gems/psych-1.2.1/lib/psych.rb:93: warning: already initialized constant VERSION
~/.gem/gems/psych-1.2.1/lib/psych.rb:96: warning: already initialized constant LIBYAML_VERSION

我尝试过谷歌搜索,但似乎找到了一个解决方案,这让我认为它特定于我的系统。有办法解决这个问题吗?

When I running ruby I get the following warnings:

~/.gem/gems/psych-1.2.1/lib/psych.rb:93: warning: already initialized constant VERSION
~/.gem/gems/psych-1.2.1/lib/psych.rb:96: warning: already initialized constant LIBYAML_VERSION

I've tried googling around but can seem to find a solution which makes me think it's specific to my system. Is there a way to fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

天生の放荡 2024-12-11 22:12:27

这个问题似乎源于Bundler.setup中bundler调用psych。我使用的解决方法:

gem 'psych'

在我之前的代码中

Bundler.setup

This problem seems to originate in psych being called by bundler in Bundler.setup. The work-around I used:

gem 'psych'

In my code before

Bundler.setup
清引 2024-12-11 22:12:27

有两种方法。

->第一

添加宝石“psych”

然后运行

捆绑安装

->第二

gem 卸载 psych

gem在控制台

There are two ways.

->First

add gem 'psych'

in your Gemfile file and then run

bundle install

-> Second

gem uninstall psych

at console

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文