简体   繁体   English

安装 unf_ext 0.0.7.2 不起作用

[英]Installing unf_ext 0.0.7.2 not working

So when I try running bundle install --without production it tells me that I am getting an error and that I need to Make sure that gem install unf_ext -v 0.0.7.2 succeeds before bundling .因此,当我尝试运行bundle install --without production时,它告诉我我遇到了一个错误,我需要Make sure that gem install unf_ext -v 0.0.7.2 succeeds before bundling I have not gotten this error before while installing other gems, but only when I try and install gem stripe (which is used for receiving user payments and such).在安装其他 gem 之前,我没有收到此错误,但只有在我尝试安装gem stripe (用于接收用户付款等)时才出现此错误。

Could someone explain what could be causing this kind of problem.有人可以解释可能导致这种问题的原因。 All help is greatly appreciated.非常感谢所有帮助。

Thanks, -Aaron谢谢,-亚伦

EDIT编辑

What I did to solve my problems was updating all of my gems to their current and latest version.我为解决我的问题所做的就是将我所有的 gem 更新到它们当前和最新的版本。 Then when I ran bundle install --without production everything seemed to install perfectly fine after that.然后,当我运行bundle install --without production之后,一切似乎都安装得很好。

This error can come across due to various reasons, so it's not easy to tell what might have really caused, preventing you from bundle install, so try the following fixes, if not worked please give more details on errors that appears :) If the error was because of missing gmkdir, then run the following command:由于各种原因可能会遇到此错误,因此很难判断可能真正导致了什么,从而阻止您进行捆绑安装,因此请尝试以下修复程序,如果不起作用,请提供有关出现的错误的更多详细信息:) 如果错误是因为缺少 gmkdir,然后运行以下命令:

brew install coreutils

If the error was due to missing C++ headers related then run the bellow command:如果错误是由于缺少相关的 C++ 头文件,则运行以下命令:

yum install gcc-c++

Also have a look at the developer's home page given below to check you meet all dependencies required:还可以查看下面给出的开发人员主页,以检查您是否满足所需的所有依赖项:

unf_ext 0.0.7.2 : Unicode Normalization Form support library for CRuby unf_ext 0.0.7.2:CRuby 的 Unicode 规范化形式支持库

After updating to Mojave MacOS version, the ruby 'lost' the reference.更新到 Mojave MacOS 版本后,红宝石“丢失”了引用。

To solve解决

$ rvm list $ rvm list

In my case, the version listed was:就我而言,列出的版本是:

ruby-2.5.1 [ x86_64 ] ruby-2.5.1 [ x86_64 ]

$ rvm use ruby-2.5.1 to change to 'current' version used $ rvm use ruby-2.5.1更改为使用的“当前”版本

$ rvm list again to see the current version $ rvm list再次查看当前版本

=> ruby-2.5.1 [ x86_64 ] => ruby​​-2.5.1 [ x86_64 ]

After that everything are okay running bundle install or bundle update or gem install or gem update之后一切正常运行bundle installbundle updategem installgem update

I just have the same problem when i try to install vagrant plugin, you need to install ruby-devel before.当我尝试安装 vagrant 插件时,我遇到了同样的问题,您需要先安装ruby-devel Hope this help you.希望这对你有帮助。

I resolved this issue by upgrading bundler.我通过升级 bundler 解决了这个问题。 Simply run:只需运行:

gem install bundler

which fetches the latest bundler.它获取最新的捆绑器。 Then, try running:然后,尝试运行:

bundle install

I ran into this deploying to a remote box.我遇到了这个部署到远程盒子的问题。 As suggested in comments, I was able to fix it by opening a console session on the affected box and running:正如评论中所建议的,我能够通过在受影响的盒子上打开一个控制台会话并运行来修复它:

gem update rails
gem install unf_ext -v '0.0.7.2'

And I was then able to deploy successfully.然后我就能够成功部署。

I got same problem.我遇到了同样的问题。 It happens after I upgrading my macOS to newer version.它发生在我将 macOS 升级到更新版本之后。 Somehows, upgrading mess up /usr/local/include.不知何故,升级搞砸了/usr/local/include。 So that I removed it and run install.所以我删除它并运行安装。 It worked有效

sudo mv /usr/local/include/ /usr/local/include.delete_me

I was having the exact same issue trying to install this specific gem and version as well.我在尝试安装这个特定的 gem 和版本时也遇到了完全相同的问题。 Turns out my VPS would run out of RAM while compiling and quit.原来我的 VPS 在编译和退出时会耗尽 RAM。 I just killed off a few processes I could live without for a few minutes and it worked...我刚刚关闭了几个我可以不用几分钟的进程,它起作用了......

I solved this issue by running我通过运行解决了这个问题

sudo xcodebuild -license须藤 xcodebuild -license

So when I try running bundle install --without production it tells me that I am getting an error and that I need to Make sure that gem install unf_ext -v 0.0.7.2 succeeds before bundling .因此,当我尝试运行bundle install --without production它告诉我出现错误,并且需要Make sure that gem install unf_ext -v 0.0.7.2 succeeds before bundling I have not gotten this error before while installing other gems, but only when I try and install gem stripe (which is used for receiving user payments and such).在安装其他gem之前,我没有收到此错误,只有在我尝试安装gem stripe (用于接收用户付款等)时才出现此错误。

Could someone explain what could be causing this kind of problem.有人可以解释可能导致这种问题的原因。 All help is greatly appreciated.非常感谢所有帮助。

Thanks, -Aaron谢谢,-亚伦

EDIT编辑

What I did to solve my problems was updating all of my gems to their current and latest version.我要解决的问题是将所有gem更新到当前和最新版本。 Then when I ran bundle install --without production everything seemed to install perfectly fine after that.然后,当我运行bundle install --without production一切似乎都安装得很好。

Similar to the comment of Luke, xcode-select did the job for me.与 Luke 的评论类似,xcode-select 为我完成了这项工作。 But instead of switching it to a different location, I just reverted the selected version to default, although I cannot remember to ever have changed it.但是我没有将其切换到其他位置,而是将所选版本恢复为默认版本,尽管我不记得曾经更改过它。

sudo xcode-select -r

After that bundle install and bundle update worked fine for me again.在捆绑安装和捆绑更新之后,我又可以正常工作了。

I was working with docker and docker compose.我正在使用 docker 和 docker compose。 similar issue arised to me.类似的问题出现在我身上。 I deleted the image, removed all associated containers with the application and rebuilt the image with docker build .我删除了图像,删除了所有与应用程序关联的容器,并使用docker build .重建了图像docker build . created the container with docker-compose up inside the working directory and it started working.在工作目录中使用docker-compose up创建容器并开始工作。 this solution is specific to those using docker and docker-compose.此解决方案特定于使用 docker 和 docker-compose 的用户。 Hope it helps someone.希望它可以帮助某人。 I am still not sure about the reason why is this happening.我仍然不确定发生这种情况的原因。

GemNotFound:在任何来源中都找不到 unf_ext-0.0.7.7

这可以解决安装ruby-dev然后gem install unf_ext -v 0.0.7.2

I ran into this issue getting我遇到了这个问题

    Installing unf_ext 0.0.8 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/jfn0296/.rvm/gems/ruby-3.0.0/gems/unf_ext-0.0.8/ext/unf_ext
/Users/jfn0296/.rvm/rubies/ruby-3.0.0/bin/ruby -I /Users/jfn0296/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0 -r
./siteconf20220120-59736-elnfu0.rb extconf.rb
checking for -lstdc++... yes
creating Makefile

current directory: /Users/jfn0296/.rvm/gems/ruby-3.0.0/gems/unf_ext-0.0.8/ext/unf_ext
make "DESTDIR=" clean

current directory: /Users/jfn0296/.rvm/gems/ruby-3.0.0/gems/unf_ext-0.0.8/ext/unf_ext
make "DESTDIR="
compiling unf.cc
make: *** [unf.o] Error 1

make failed, exit code 2

After trying many of these listed, using rvm I uninstalled and reinstalled my ruby-3.0.0 and tried bundling again and this time it worked.在尝试了许多列出的这些之后,我使用 rvm 卸载并重新安装了我的 ruby​​-3.0.0 并再次尝试捆绑,这次它成功了。 Did not see a solution like that here so I thought I'd share.在这里没有看到这样的解决方案,所以我想我会分享。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM