我目前在尝试安装Rubocop时遇到了这个问题(我也无法安装nokigiri ): ~$ sudo gem install rubocop
Building native extensions. This could take a while...
ERROR: Error installing rubocop:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/jaro_winkler-1.5.2/ext/jaro_winkler
/usr/
从我的rails应用程序根目录运行rubocop,并将rubocop配置为使用inherit_gem属性,会给出错误;
Unable to find gem gem_name; is the gem installed? Gem::MissingSpecError
但是gem我确认了gem是用bundler安装的,并且在Gemfile中。
我遗漏了什么?
我试图将rubocop与原子连接起来,但收到了以下错误:
linter-registry.js [sm]:144 [Linter] Error running RuboCop Error: /usr/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'rubocop' (>= 0.a) among 16 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/home/kurilovichay/.rvm/gems/r
我们目前在一个针对我们的rails应用程序的私有Github中托管了一个gem (rubocop的自定义版本)。为了成功地bundle install该gem,邦德勒需要拥有对该repo具有读取权限的凭证。我们只使用这个创业板进行本地开发,因此创业板在我们项目的Gemfile中被列在开发组下:
group :development do
...
source 'https://rubygems.pkg.github.com/<org>' do
gem '<custom-gem>'
end
end
Gemfile.lock中的
我想为我的定制警察编写规范。这个gem有方便的助手定义的。我想要求它。如何实现什么?
我尝试使用Gem.find_files,这使我能够要求gem中的任何文件,但只能在lib目录下使用。
例如:
# this requires ...gems/rubocop-0.29.1/lib/rubocop/formatter/formatter_set.rb
require Gem.find_files('rubocop/formatter/formatter_set.rb').first
# but I need ...gems/rubocop-0.29.1/spec/support/
在VSCode中打开拼音文件时,出现以下错误:
.rubocop.yml: Metrics/LineLength has the wrong namespace - should be Layout Error: The `Style/BracesAroundHashParameters` cop has been removed. (obsolete configuration found in .rubocop.yml, please update it)
因此,VSCode中的线条不起作用。原因很明显: rubocop cop在Metrics名称空间下,因为项目使用rubocop 0.7
我正在用我的笔记本电脑为一个非工作的开源项目做贡献。在工作中,我们使用rbenv来管理Ruby版本,但是开放源码项目似乎希望gem依赖项位于system文件夹中。因此,当我尝试运行某些项目的命令时,我会遇到缺少的gem错误。
这个项目是Homebrew,我正在运行的命令是brew style。当我在本地运行命令时,会得到以下命令:
Ignoring rainbow-2.2.2 because its extensions are not built. Try: gem pristine rainbow --version 2.2.2
/usr/local/Homebrew/Library/H
包安装在Mac上运行了两次
➜ k_rails_template git:(main) ✗ bundle install
Using Local GEMs
Using Local GEMs <----
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/........... <----
Resolving dependencies....
Using rake 12.3.3
.
.
.
我已经检查了各种.zsh配置
我正在使用GitLab-CI/CD构建我的Rails应用程序。我已经注意到我的构建失败了,因为Using a custom path while using system gems is unsupported错误,这是非常好以前的工作。
试图检查更新版本,但没有发现任何问题。有没有人对最近的更新或提到的问题有任何想法?
贝娄是我的gitlab-ci.yml
variables:
GIT_SUBMODULE_STRATEGY: recursive
cache:
key: ${CI_JOB_NAME}
paths:
- vendor/ruby
before_script:
我有一个运行在ruby 2.7.2上的rails应用程序,在Gemfile中包含以下内容: group :development, :test do
gem 'rubocop'
gem 'rubocop-minitest'
gem 'rubocop-performance'
gem 'rubocop-rails'
end 已经运行了bundle install和bundle update。每当我在目录中运行rubocop时,我都会得到以下结果: Could not find 'activesupport&
在我更新到High Sierra之前,一切都很好,现在jekyll不能运行了。我卸载了jekyll,确保ruby是使用brew更新的(说ruby 2.4.2_1已经安装),然后尝试重新安装jekyll。这是我从命令行得到的错误。
Last login: Sat Dec 9 20:15:25 on ttys000
Wills-MBP:~ Will$ sudo gem uninstall jekyll
Password:
Gem 'jekyll' is not installed
Wills-MBP:~ Will$ gem install bundle
Fetching: bun
当我运行一个赤裸裸的rubocop时,我得到了这个。 gem list | egrep 'rubocop|cookstyle'
cookstyle (7.10.0)
rubocop (1.12.1, 1.12.0)
rubocop-ast (1.4.1)
rubocop-performance (1.10.2)
The error follows upon running rubocop with no parameters:
Unable to activate cookstyle-7.10.0, because rubocop-1.12.1 conflicts wit
我在上使用Windows installer安装了Ruby on Rails。安装过程中没有任何错误。然而,当我尝试的时候:
rails new blog
我得到了以下错误:
使用本机扩展安装json (1.6.5) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension。C:/opt/Ruby_on_Rails/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb安装json (1.6.5)时出错,Bundler无法继续。在捆绑之前,请确保ge
它将错误显示为
root@DESKTOP-L0VTSD5:~# gem install rubocop
Fetching: jaro_winkler-1.5.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rubocop:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/jaro_winkler-1.5
我运行RubyVersion2.6.1与docker。Rake是13.0.1版。
每当我尝试进行对接时,它总是失败,每次都抛出这个错误:
此错误以前不存在。
redis_1 | WARNING: no logs are available with the 'none' log driver
db_1 | WARNING: no logs are available with the 'none' log driver
web_1 | bundler: failed to load command: rails (/bundle/bin/rail