Ruby on Rails ”nokogiri” のインストールができません。
こちらのサイトに従い、以下の操作を行いました。
https://qiita.com/TAByasu/items/47c6cfbeeafad39eda07
$ brew install rbenv ruby-build
$ echo 'export PATH="~/.rbenv/shims:/usr/local/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile
$ rbenv install --list
$ rbenv install 2.5.0
$ rbenv global 2.5.0
$ rbenv rehash
$ ruby -v
$ gem install bundler
$ bundle -v
$ brew install mysql
$ mysql.server start
$ mkdir ~/workspace
$ cd ~/workspace
$ bundle init
Gemfileを編集し# gem "rails"をコメント解除する
$ bundle install --path=vendor/bundle
すると、以下のようなエラーが出てしまいました。
Errno::EACCES: Permission denied @ rb_sysopen -
/Users/matsumotoshintaro/workspace/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.8.5/.autotest
An error occurred while installing nokogiri (1.8.5), and Bundler
cannot continue.
Make sure that gem install nokogiri -v '1.8.5' --source 'https://rubygems.org/'
succeeds before bundling.
In Gemfile:
rails was resolved to 5.2.2, which depends on
actioncable was resolved to 5.2.2, which depends on
actionpack was resolved to 5.2.2, which depends on
actionview was resolved to 5.2.2, which depends on
rails-dom-testing was resolved to 2.0.3, which depends on
nokogiri
matsumotosusumutarou-no-MacBook-Pro$ vi .bundle/config [/workspace]/workspace]
matsumotosusumutarou-no-MacBook-Pro$ vi .bundle/config [
matsumotosusumutarou-no-MacBook-Pro$ bundle install --path=vendor/bundle
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 12.3.2
Using concurrent-ruby 1.1.3
Using i18n 1.1.1
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.2
Using builder 3.2.3
Using erubi 1.7.1
Using mini_portile2 2.3.0
Fetching nokogiri 1.8.5
Installing nokogiri 1.8.5 with native extensions
Errno::EACCES: Permission denied @ rb_sysopen -
/Users/matsumotoshintaro/workspace/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.8.5/.autotest
An error occurred while installing nokogiri (1.8.5), and Bundler
cannot continue.
Make sure that gem install nokogiri -v '1.8.5' --source 'https://rubygems.org/'
succeeds before bundling.
In Gemfile:
rails was resolved to 5.2.2, which depends on
actioncable was resolved to 5.2.2, which depends on
actionpack was resolved to 5.2.2, which depends on
actionview was resolved to 5.2.2, which depends on
rails-dom-testing was resolved to 2.0.3, which depends on
nokogiri
プログラミング初心者のため、何か楚保的なミスをしている可能性もあります。原因が何か分かりましたら、ご教授願います。
ここにより詳細な情報を記載してください。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。