0

我是 ruby​​ 的新手,执行命令时遇到问题:

bundle install

我正在使用 FEDORA28 并已使用 rvm 安装了 ruby​​,但显然缺少某些内容或权限错误,但我不明白。我有这个答案:

Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 12.0.0
Using concurrent-ruby 1.0.5
Using i18n 0.8.6
Using minitest 5.10.3
Using thread_safe 0.3.6
Using tzinfo 1.2.3
Using activesupport 5.1.3
Using builder 3.2.3
Using erubi 1.6.1
Using mini_portile2 2.2.0
Fetching nokogiri 1.8.0
Installing nokogiri 1.8.0 with native extensions
Errno::EACCES: Permission denied @ rb_sysopen -
/home/BFournier/Documents/Boris/rothenberg/benchmark-headless-chrome- 
vs-phantomjs/vendor/bundle/ruby/2.5.0/extensions/x86_64- 
linux/2.5.0/nokogiri-1.8.0/gem_make.out
An error occurred while installing nokogiri (1.8.0), and Bundler 
cannot continue.
Make sure that `gem install nokogiri -v '1.8.0' --source 
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  rails was resolved to 5.1.3, which depends on
    actioncable was resolved to 5.1.3, which depends on
      actionpack was resolved to 5.1.3, which depends on
        actionview was resolved to 5.1.3, which depends on
          rails-dom-testing was resolved to 2.0.3, which depends on
            nokogiri

当我尝试执行此操作时:

gem install nokogiri -v '1.8.0' --source 'https://rubygems.org/'

我有这个 :

ERROR:  Error installing nokogiri:
ERROR: Failed to build gem native extension.

current directory: /home/BFournier/.gem/ruby/gems/nokogiri- 
1.8.0/ext/nokogiri
/usr/bin/ruby -r ./siteconf20181129-21800-1ke3w2r.rb extconf.rb
checking if the C compiler accepts ... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of 
necessary
libraries and/or headers.  Check the mkmf.log file for more details.  
You may need configuration options.

我发现了一些类似的问题,但目前我尝试的所有方法都不起作用。提前感谢任何线索。

4

1 回答 1

0

愚蠢的我,这太简单了,我讨厌自己。只是我可能已经用 sudo 安装了一些东西,并且权限仅适用于 ROOT 用户,所以我刚刚更改了文件的权限,仅此而已。再次感谢您的帮助@drosam

于 2018-11-29T15:53:48.830 回答