我从 ruby 2.7.1 更新到 3.1.1,然后删除 Gemfile.lock 并运行bundle update(它位于开发分支上,所以如果这是一个坏主意,我可以扔掉它,我只是想看看它是否有效)。
bundle update成功了,但是当我启动服务器时:
rails s
=> Booting Puma
=> Rails 7.0.2.2 application starting in development
=> Run `bin/rails server --help` for more startup options
Exiting
/Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:430:in `visit_Psych_Nodes_Alias': Unknown alias: default (Psych::BadAlias)
from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
from /Users/st/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in …Run Code Online (Sandbox Code Playgroud) 我的问题似乎与此问题类似,但它发生在我yarn install在 Rails 应用程序中运行时。
当我运行时yarn install,它成功运行了一段时间,然后
../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' of type 'const std::__1::basic_string<char>' creates a copy from type 'const std::__1::basic_string<char>' [-Wrange-loop-analysis]
for (const auto numerator : numerators)
^
../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::__1::basic_string<char> &' to prevent copying
for (const auto numerator : numerators)
^~~~~~~~~~~~~~~~~~~~~~
&
../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' of type 'const std::__1::basic_string<char>' creates a copy from type 'const std::__1::basic_string<char>' [-Wrange-loop-analysis]
for (const auto denominator : denominators)
^
../src/libsass/src/ast.hpp:1616:14: …Run Code Online (Sandbox Code Playgroud) 从 Rails 6 升级到 Rails 7 并在本地运行一些 ActiveStorage 方法时,我看到:
Could not open library 'vips.42': dlopen(vips.42, 0x0005): tried: 'vips.42' (no such file), '/usr/local/lib/vips.42' (no such file), '/usr/lib/vips.42' (no such file), '/Users/st/rails/myapp/vips.42' (no such file), '/usr/local/lib/vips.42' (no such file), '/usr/lib/vips.42' (no such file). (LoadError)
Could not open library 'libvips.42.dylib': dlopen(libvips.42.dylib, 0x0005): tried: 'libvips.42.dylib' (no such file), '/usr/local/lib/libvips.42.dylib' (no such file), '/usr/lib/libvips.42.dylib' (no such file), '/Users/st/rails/myapp/libvips.42.dylib' (no such file), '/usr/local/lib/libvips.42.dylib' (no such file), '/usr/lib/libvips.42.dylib' (no such file)
Run Code Online (Sandbox Code Playgroud)
GitHub 上有很多类似的问题:(例如这里)。
我不确定是否需要安装 ruby-vips …
假设 CI 工作流程正在运行,如何查看完整日志?
2022-07-14T16:29:41.4911629Z Requested labels: ubuntu-latest
2022-07-14T16:29:41.4911713Z Job defined at: username/repo/.github/workflows/main.yml@refs/heads/main
2022-07-14T16:29:41.4911751Z Waiting for a runner to pick up this job...
2022-07-14T16:29:42.2335026Z Job is waiting for a hosted runner to come online.
2022-07-14T16:29:48.5809023Z Job is about to start running on the hosted runner: Hosted Agent (hosted)
Run Code Online (Sandbox Code Playgroud)
但我知道还有更多。
假设我安装了 R 版本 3.xx,并且升级到版本 4.xx,是否有任何快速/简单的方法来安装我已安装的所有新版本的库?
请假设所有包都在 CRAN 上
我需要查询公共项目提供的数据集。我创建了自己的项目并将他们的数据集添加到我的项目中。有一个名为:的表domain_public。当我查询此表时,出现此错误:
Query Failed
Error: Not found: Dataset my-project-name:domain_public was not found in location US
Job ID: my-project-name:US.bquijob_xxxx
Run Code Online (Sandbox Code Playgroud)
我来自非美国国家。请问这是什么问题以及如何解决?
编辑 1:
我将处理位置更改为asia-northeast1(我在新加坡)但同样的错误:
Error: Not found: Dataset censys-my-projectname:domain_public was not found in location asia-northeast1
Run Code Online (Sandbox Code Playgroud)
这是我的项目和公共项目的视图censys-io:
请指教。
编辑 2: 我用来键入的查询基于 censys教程是:
#standardsql
SELECT domain, alexa_rank
FROM domain_public.current
WHERE p443.https.tls.cipher_suite = 'some_cipher_suite_goes_here';
Run Code Online (Sandbox Code Playgroud)
当我将FROM条款更改为:
FROM `censys-io.domain_public.current`
Run Code Online (Sandbox Code Playgroud)
最后一行:
WHERE p443.https.tls.cipher_suite.name = 'some_cipher_suite_goes_here';
Run Code Online (Sandbox Code Playgroud)
有效。我是否应该理解我应该始终包括projectname.dataset.table(如果我使用正确的术语)并指出 Censys 的错字?或者出于某种原因,这是这个项目的特例吗?
我正在尝试学习如何将本地硬盘中的图像附加到 Active Storage。例如
User.last.images.attach("../../Downloads/me.jpg")
Run Code Online (Sandbox Code Playgroud)
但我看到
ActiveSupport::MessageVerifier::InvalidSignature: ActiveSupport::MessageVerifier::InvalidSignature
from /Users/st/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/message_verifier.rb:176:in `verify'
Run Code Online (Sandbox Code Playgroud) 有没有办法/地方我可以得到简单的指标
我最近在CRAN上发布了自己的软件包,我想稍微监控一下.
我仅限于使用[]()语法来渲染图像(而不是<img>)(此限制的原因是因为它当前被用作已知错误的解决方法)。
有没有办法仅 []()使用约定(不使用<img>)来调整图像大小?
到目前为止我已经尝试过一些方法但没有成功。最为显着地:
在图片url末尾添加?s=200/参数(这里推荐)&s=200
到目前为止,我最好的解决方案是下载图像并调整其大小并重新上传。任何从自身更改其大小md或通过更改 url 的方式(例如通过参数等)都会更好
有什么办法可以让R+闪亮的构建更小,以便在部署闪亮的应用程序时使其重量更轻?(或管道工 API,或任何其他 R 进程?)
我一直在 kubernetes 中部署闪亮的应用程序,并且构建比用其他语言(例如 python)编写的类似应用程序要大得多。
我还部署了一些到heroku,它们也是相当大的构建(数百 MB,而其他语言的其他类似应用程序可能只有几十 MB)。
我知道基础 R 相当大,但包是构建大小的大部分,所以我通过不导入任何不必要的东西并从包中提取一些功能来尽可能地减少它们,以便不必包含整个东西.