railsでbcyptのgemを入れてbandle install したところ以下のエラー文がでました。ネットで似たようなエラーの対策を検索して
bundle update
Gemfile.lockの削除と再度bundle install
↓Gemfileでは以下のようにバージョンをしないでbundle installやってみました
gem 'bcrypt'
コマンドと表示された文を貼る修正をしました。すみません。
解決策を教えてください
$ bundle install Fetching gem metadata from https://rubygems.org/......... Fetching version metadata from https://rubygems.org/.. Fetching dependency metadata from https://rubygems.org/. Resolving dependencies... Using rake 11.2.2 Using concurrent-ruby 1.0.2 Using i18n 0.7.0 Using minitest 5.9.0 Using thread_safe 0.3.5 Using builder 3.2.2 Using erubis 2.7.0 Using mini_portile2 2.1.0 Using pkg-config 1.1.7 Using rack 2.0.1 Using nio4r 1.2.1 Using websocket-extensions 0.1.2 Using mime-types-data 3.2016.0521 Using arel 7.1.2 Using execjs 2.7.0 Using sass 3.4.22 Using bundler 1.13.0 Using byebug 9.0.5 Using coffee-script-source 1.10.0 Using method_source 0.8.2 Using thor 0.19.1 Using debug_inspector 0.0.2 Using diff-lcs 1.2.5 Using ffi 1.9.14 Using tilt 2.0.5 Using sexp_processor 4.7.0 Using multi_json 1.12.1 Using rb-fsevent 0.9.7 Using puma 3.6.0 Using rspec-support 3.5.0 Using spring 1.7.2 Using sqlite3 1.3.11 Using turbolinks-source 5.0.0 Using tzinfo 1.2.2 Using nokogiri 1.6.8 Using rack-test 0.6.3 Using sprockets 3.7.0 Using websocket-driver 0.6.4 Using mime-types 3.1 Bundler::GemspecError: Could not read gem at /Users/mypc/myapp/vendor/bundle/ruby/2.3.0/cache/bcrypt-3.1.11.gem. It may be corrupted. An error occurred while installing bcrypt (3.1.11), and Bundler cannot continue. Make sure that `gem install bcrypt -v '3.1.11'` succeeds before bundling.
$ bundle update Fetching gem metadata from https://rubygems.org/......... Fetching version metadata from https://rubygems.org/.. Fetching dependency metadata from https://rubygems.org/. Resolving dependencies... Using rake 11.2.2 Using concurrent-ruby 1.0.2 Using i18n 0.7.0 Using minitest 5.9.0 Using thread_safe 0.3.5 Using builder 3.2.2 Using erubis 2.7.0 Using mini_portile2 2.1.0 Using pkg-config 1.1.7 Using rack 2.0.1 Using nio4r 1.2.1 Using websocket-extensions 0.1.2 Using mime-types-data 3.2016.0521 Using arel 7.1.2 Using execjs 2.7.0 Using sass 3.4.22 Using bundler 1.13.0 Using byebug 9.0.5 Using coffee-script-source 1.10.0 Using method_source 0.8.2 Using thor 0.19.1 Using debug_inspector 0.0.2 Using diff-lcs 1.2.5 Using ffi 1.9.14 Using tilt 2.0.5 Using sexp_processor 4.7.0 Using multi_json 1.12.1 Using rb-fsevent 0.9.7 Using puma 3.6.0 Using rspec-support 3.5.0 Using spring 1.7.2 Using sqlite3 1.3.11 Using turbolinks-source 5.0.0 Using tzinfo 1.2.2 Using sprockets 3.7.0 Using nokogiri 1.6.8 Using rack-test 0.6.3 Using websocket-driver 0.6.4 Bundler::GemspecError: Could not read gem at /Users/mypc/myapp/vendor/bundle/ruby/2.3.0/cache/bcrypt-3.1.11.gem. It may be corrupted. An error occurred while installing bcrypt (3.1.11), and Bundler cannot continue. Make sure that `gem install bcrypt -v '3.1.11'` succeeds before bundling.
$ gem install bcrypt --version '3.1.11' ERROR: While executing gem ... (Errno::EACCES) Permission denied @ rb_sysopen - /Users/mypc/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11/.gitignore mypc@mypc:~/myapp (hoge *+) $ sudo gem install bcrypt --version '3.1.11' Password: Building native extensions. This could take a while... ERROR: Error installing bcrypt: ERROR: Failed to build gem native extension. current directory: /Users/mypc/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11/ext/mri /Users/mypc/.rbenv/versions/2.3.1/bin/ruby -r ./siteconf20160917-47379-mjzwki.rb extconf.rb creating Makefile current directory: /Users/mypc/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11/ext/mri make "DESTDIR=" clean You have not agreed to the Xcode license agreements, please run 'xcodebuild -license' (for user-level acceptance) or 'sudo xcodebuild -license' (for system-wide acceptance) from within a Terminal window to review and agree to the Xcode license agreements. current directory: /Users/mypc/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11/ext/mri make "DESTDIR=" You have not agreed to the Xcode license agreements, please run 'xcodebuild -license' (for user-level acceptance) or 'sudo xcodebuild -license' (for system-wide acceptance) from within a Terminal window to review and agree to the Xcode license agreements. make failed, exit code 69 Gem files will remain installed in /Users/mypc/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11 for inspection. Results logged to /Users/mypc/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/bcrypt-3.1.11/gem_make.out
回答1件
あなたの回答
tips
プレビュー