Bundle install ошибка

I’m developing Ruby on Rails on Windows.

Something went wrong with our local network and can’t access https://www.rubygems.org, seems like it is blocked or something.

But I can access it through http://www.proxyfoxy.com.

Below is the result of bundle install:

$ bundle install

Fetching source index from https://rubygems.org/

Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/

Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/

Retrying fetcher due to error (4/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/

Could not fetch specs from https://rubygems.org/

Is there any other way to install gems through bundle install?

Community's user avatar

asked Jul 16, 2016 at 10:27

ruby1141's user avatar

3

Open the Gemfile and change first line from this

source 'https://www.rubygems.org'

to this

source 'http://www.rubygems.org'

remove the ‘s‘ from ‘https‘.

Captain Man's user avatar

Captain Man

6,8375 gold badges48 silver badges73 bronze badges

answered Nov 20, 2017 at 13:02

ACHYUT KADAM's user avatar

3

As @Wasif mentioned, first make sure the Ruby Gems site is up and your network access is ok.

If they works fine, try it like this:

  • First, delete your Gemfile.lock file

  • Then run gem update --system

  • Then in your Gemfile try changing the first line source
    'https://rubygems.org'
    to http:// (without an s)

Unless there is a problem with your connectivity this should fix the issue with bundle install.

answered Jul 16, 2016 at 11:44

Lahiru Jayaratne's user avatar

Lahiru JayaratneLahiru Jayaratne

1,6644 gold badges31 silver badges35 bronze badges

1

I had the same issue and it happened to work when I shutdown the rails server before running bundle install

answered Oct 29, 2016 at 6:29

Van_Paitin's user avatar

Van_PaitinVan_Paitin

3,5402 gold badges22 silver badges26 bronze badges

I faced the same issue but on Ubuntu, what helped was running:

env | grep proxy

which showed some active proxies like these:

https_proxy=127.0.0.1:8888
http_proxy=127.0.0.1:8888

After I removed each of them with the unset command:

unset https_proxy
unset http_proxy

I could run bundle install normally.

answered Dec 12, 2019 at 9:39

Viktor's user avatar

ViktorViktor

2,5933 gold badges18 silver badges28 bronze badges

While gem is stalling, I ran netstat

netstat -tnp | grep ruby

and I got below output

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      1 2401:4900:188e:90:56960 2a04:4e42:600::644:443  SYN_SENT    4096/ruby

and 2a04:4e42:600::644:443 is one of the addresses of api.rubygems.org

My conclusion is that gem uses IPv6 when it can.

So disabling IPV6 on my workstation fixed it.

Below are the steps to temporarily disabled IPV6 on Ubuntu. IPV6 will be enabled after system restart.

sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1

Note: Use sudo for permission denied issue.

answered Apr 3, 2021 at 3:48

Rakesh's user avatar

RakeshRakesh

7934 silver badges22 bronze badges

1

It’s a connectivity issue.

I solved it through hideMe VPN. It is used to bypass blocked websites or for servers down only for a particular user.

Now everything seems to work just fine.

Grant Winney's user avatar

Grant Winney

64.9k12 gold badges114 silver badges164 bronze badges

answered Oct 29, 2016 at 6:34

ruby1141's user avatar

ruby1141ruby1141

1671 gold badge1 silver badge5 bronze badges

I was getting the same error when running bundle in a rails app. I solve the problem by running:

$ bin/bundle

Problem was that bundle was v1.17.3, while bin/bundle was version 2.0.2.

answered Sep 16, 2019 at 23:33

builder-7000's user avatar

builder-7000builder-7000

7,0813 gold badges19 silver badges43 bronze badges

This mistake was very difficult for me. I was a day without being able to solve it but finally I turned off my wifi router and waited 1 minute to turn it on again. Then the error was fixed, hope it helps.

answered Apr 23, 2020 at 18:42

Joel Alayon's user avatar

It is just a network issue.

follwoing things can help you to solve this problem -:

  1. forget the network and reconnect it.
  2. Turn on aeroplane mode of your mobile and again turn off it if you connected with mobile hotspot

answered Jan 12, 2021 at 8:56

Pradnyesh patil's user avatar

Someone might find this useful: I had this error message when building a docker image and it turned out I had some custom dns settings in /etc/docker/daemon.json

answered May 27, 2021 at 19:20

Michal Lonski's user avatar

Michal LonskiMichal Lonski

8671 gold badge11 silver badges20 bronze badges

In your Gemfile from the first line the source should be http:// instead of https://

change

sourçe  https://www.rubygems.org into

source  http://www.rubygems.org

Then you can run bundle install successfully

answered Oct 29, 2016 at 13:01

nifCody's user avatar

nifCodynifCody

2,3753 gold badges33 silver badges54 bronze badges

It’s a connectivity issue.I solved it through hideMe VPN. it is used to bypass blocked websites or for servers down only for a particular user

answered Jul 20, 2016 at 6:26

ruby1141's user avatar

ruby1141ruby1141

1671 gold badge1 silver badge5 bronze badges

0

A bundle install command in Ruby is used to install all of a project’s dependencies. But occasionally, this command could falter and issue an error. Numerous variables might be to blame for this issue, and fixing it might prove challenging. In this post, we’ll go through some of the typical reasons for bundle install errors in Ruby along with solutions.

What Causes the Bundle Install Error?

There could be a few different reasons for this error when running bundle install in a Ruby project. Some common causes include:

1. Outdated/Missing RubyGems

One of the most common causes of bundle install errors is a missing or outdated version of the RubyGems package manager. RubyGems is a package manager for the Ruby programming language that is used to manage the installation and updating of Ruby libraries, also known as gems. If the version of RubyGems is outdated or missing, it may lead to errors when running bundle install.

Solution:

To fix this issue, we can update RubyGems to the latest version by running the command:

 gem update --system

2. Outdated/Missing BundlerGem

Another common cause of bundle install errors is a missing or outdated version of the Bundler gem. Bundler is a gem that is used to manage dependencies in a Ruby project. If the version of Bundler is outdated or missing, it may lead to errors when running bundle install.

Solution:

To fix this issue, we can install or update the Bundler gem by running the command:

 gem install bundler

3. Conflicting Versions of Gems:

Another cause of bundle install errors is conflicting versions of a gem in the Gemfile.lock file. A Gemfile.lock file is a file that stores the exact versions of all the gems that are used in a project. If there are conflicting versions of a gem in this file, it may lead to errors when running bundle install.

Solution: Conflicting Versions of a Gem

To fix this issue, we can check our Gemfile.lock file and try to remove or update the conflicting gems.

A similar cause is conflicting dependencies between two or more gems in a project. If two or more gems in a project depend on different versions of another gem, it may lead to errors when running bundle install.

Solution: Conflicting Dependencies

To fix this issue, we can check the dependencies of each gem in our project and try to find a compatible version of the conflicting gem.

Bundle Install Error Examples

Here are a couple of examples of bundle install errors.

Example 1: Bundle Install Error

In this example, the error message is indicating that the current version of Bundler (2.2.5) is incompatible with the version of the Rails gem specified in the Gemfile (5.2.1). The error message suggests running gem install bundler to update Bundler to resolve the problem.

 
 $ bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Resolving dependencies...
Bundler could not find compatible versions for gem "rails":
  In Gemfile:
    rails (= 5.2.1)

  Current Bundler version:
    bundler (2.2.5)

  This Gemfile requires a different version of Bundler.
  Perhaps you need to update Bundler by running 'gem install bundler'?
  

Example 2: Bundle Install Error

In this example, the error message is indicating that the current version of Ruby installed is not compatible with the version required by the nokogiri gem (2.3), and the error message suggests that we should upgrade our Ruby version to a version greater than 2.3.

 
 $ bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Resolving dependencies...
Bundler could not find compatible versions for gem "nokogiri":
  In Gemfile:
    nokogiri (~> 1.8)

  Current Bundler version:
    bundler (2.2.5)

nokogiri (~> 1.8) requires ruby version >= 2.3, which is incompatible with the current version, ruby 2.2.10p479

It is important to note that these are just examples, and the specific error message we receive may vary depending on the details of our project and the cause of the error.

The following command can help view detailed error messages that may provide more information about the issue:

 bundle install --verbose
 

The above command will give us more information about the error and what caused it; this additional context could help us troubleshoot the error properly.

How to Resolve the Bundle Install Error

By understanding the causes of the errors and using the methods mentioned below, we can easily troubleshoot and fix bundle install errors in our Ruby projects:

  • Run gem update --system to update RubyGems to the latest version.
  • Run gem install bundler to install or update the Bundler gem.
  • Run bundle update to update all gems to their latest versions.
  • Check the Gemfile.lock file and try to remove or update the conflicting gems.
  • Run bundle install --verbose to get specific error messages that might give you further insight into the problem.

Track, Analyze and Manage Errors With Rollbar

Managing errors and exceptions in your code is challenging. It can make deploying production code an unnerving experience. Being able to track, analyze, and manage errors in real-time can help you proceed with more confidence. Rollbar automates error monitoring and triaging, making fixing Ruby errors easier than ever. Try it today!

— ERROR REPORT TEMPLATE ——————————————————-

Error Report

Questions

Please fill out answers to these questions, it’ll help us figure out
why things are going wrong.

  • What did you do?

    I ran the command /usr/local/bin/bundle install

  • What did you expect to happen?

    I expected Bundler to install succesfully,

  • What happened instead?

    Instead, what happened was Permission denied error

  • Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?

    I tried chown command. but it doesn’t work.

  • Have you read our issues document, https://github.com/rubygems/rubygems/blob/master/bundler/doc/contributing/ISSUES.md?

Backtrace

Errno::EACCES: Permission denied @ rb_sysopen - /Users/kyunni/DevelopmentProjects/kyunnis.github.io/vendor/bundle/ruby/2.6.0/gems/commonmarker-0.17.13/LICENSE.txt
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package.rb:408:in `initialize'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package.rb:408:in `open'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package.rb:408:in `block (2 levels) in extract_tar_gz'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package/tar_reader.rb:65:in `each'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package.rb:389:in `block in extract_tar_gz'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package.rb:522:in `block in open_tar_gz'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package.rb:519:in `wrap'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package.rb:519:in `open_tar_gz'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package.rb:388:in `extract_tar_gz'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package.rb:368:in `block (2 levels) in extract_files'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package/tar_reader.rb:65:in `each'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package.rb:365:in `block in extract_files'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package/file_source.rb:30:in `open'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package/file_source.rb:30:in `with_read_io'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/package.rb:362:in `extract_files'
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:851:in `extract_files'
  /Users/kyunni/.gem/ruby/2.6.0/gems/bundler-2.2.29/lib/bundler/rubygems_gem_installer.rb:24:in `install'
  /Users/kyunni/.gem/ruby/2.6.0/gems/bundler-2.2.29/lib/bundler/source/rubygems.rb:199:in `install'
  /Users/kyunni/.gem/ruby/2.6.0/gems/bundler-2.2.29/lib/bundler/installer/gem_installer.rb:54:in `install'
  /Users/kyunni/.gem/ruby/2.6.0/gems/bundler-2.2.29/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /Users/kyunni/.gem/ruby/2.6.0/gems/bundler-2.2.29/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
  /Users/kyunni/.gem/ruby/2.6.0/gems/bundler-2.2.29/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
  /Users/kyunni/.gem/ruby/2.6.0/gems/bundler-2.2.29/lib/bundler/worker.rb:62:in `apply_func'
  /Users/kyunni/.gem/ruby/2.6.0/gems/bundler-2.2.29/lib/bundler/worker.rb:57:in `block in process_queue'
  /Users/kyunni/.gem/ruby/2.6.0/gems/bundler-2.2.29/lib/bundler/worker.rb:54:in `loop'
  /Users/kyunni/.gem/ruby/2.6.0/gems/bundler-2.2.29/lib/bundler/worker.rb:54:in `process_queue'
  /Users/kyunni/.gem/ruby/2.6.0/gems/bundler-2.2.29/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'

Environment

Bundler       2.2.29
  Platforms   ruby, universal-darwin-21
Ruby          2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]
  Full Path   /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
  Config Dir  /Library/Ruby/Site
RubyGems      3.0.3.1
  Gem Home    /Users/kyunni/DevelopmentProjects/kyunnis.github.io/vendor/bundle/ruby/2.6.0
  Gem Path    /Users/kyunni/DevelopmentProjects/kyunnis.github.io/vendor/bundle/ruby/2.6.0
  User Home   /Users/kyunni
  User Path   /Users/kyunni/.gem/ruby/2.6.0
  Bin Dir     /Users/kyunni/DevelopmentProjects/kyunnis.github.io/vendor/bundle/ruby/2.6.0/bin
OpenSSL
  Compiled    LibreSSL 2.8.3
  Loaded      LibreSSL 2.8.3
  Cert File   /private/etc/ssl/cert.pem
  Cert Dir    /private/etc/ssl/certs
Tools
  Git         2.33.1
  RVM         not installed
  rbenv       rbenv 1.2.0
  chruby      not installed

Bundler Build Metadata

Built At          2021-10-08
Git SHA           4440b035ef
Released Version  true

Bundler settings

path
  Set for your local app (/Users/kyunni/DevelopmentProjects/kyunnis.github.io/.bundle/config): "vendor/bundle"

Gemfile

Gemfile

source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
#     bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 4.2.1"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
# gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.

# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-feed" #, "~> 0.12"
  gem "github-pages"
  gem "jekyll-include-cache"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
  gem "tzinfo"  #, "~> 1.2"
  gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    activesupport (6.0.4.1)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 0.7, < 2)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
      zeitwerk (~> 2.2, >= 2.2.2)
    addressable (2.8.0)
      public_suffix (>= 2.0.2, < 5.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.11.1)
    colorator (1.1.0)
    commonmarker (0.17.13)
      ruby-enum (~> 0.5)
    concurrent-ruby (1.1.9)
    dnsruby (1.61.7)
      simpleidn (~> 0.1)
    em-websocket (0.5.2)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0.6.0)
    ethon (0.14.0)
      ffi (>= 1.15.0)
    eventmachine (1.2.7)
    execjs (2.8.1)
    faraday (1.8.0)
      faraday-em_http (~> 1.0)
      faraday-em_synchrony (~> 1.0)
      faraday-excon (~> 1.1)
      faraday-httpclient (~> 1.0.1)
      faraday-net_http (~> 1.0)
      faraday-net_http_persistent (~> 1.1)
      faraday-patron (~> 1.0)
      faraday-rack (~> 1.0)
      multipart-post (>= 1.2, < 3)
      ruby2_keywords (>= 0.0.4)
    faraday-em_http (1.0.0)
    faraday-em_synchrony (1.0.0)
    faraday-excon (1.1.0)
    faraday-httpclient (1.0.1)
    faraday-net_http (1.0.1)
    faraday-net_http_persistent (1.2.0)
    faraday-patron (1.0.0)
    faraday-rack (1.0.0)
    ffi (1.15.4)
    forwardable-extended (2.6.0)
    gemoji (3.0.1)
    github-pages (220)
      github-pages-health-check (= 1.17.9)
      jekyll (= 3.9.0)
      jekyll-avatar (= 0.7.0)
      jekyll-coffeescript (= 1.1.1)
      jekyll-commonmark-ghpages (= 0.1.6)
      jekyll-default-layout (= 0.1.4)
      jekyll-feed (= 0.15.1)
      jekyll-gist (= 1.5.0)
      jekyll-github-metadata (= 2.13.0)
      jekyll-mentions (= 1.6.0)
      jekyll-optional-front-matter (= 0.3.2)
      jekyll-paginate (= 1.1.0)
      jekyll-readme-index (= 0.3.0)
      jekyll-redirect-from (= 0.16.0)
      jekyll-relative-links (= 0.6.1)
      jekyll-remote-theme (= 0.4.3)
      jekyll-sass-converter (= 1.5.2)
      jekyll-seo-tag (= 2.7.1)
      jekyll-sitemap (= 1.4.0)
      jekyll-swiss (= 1.0.0)
      jekyll-theme-architect (= 0.2.0)
      jekyll-theme-cayman (= 0.2.0)
      jekyll-theme-dinky (= 0.2.0)
      jekyll-theme-hacker (= 0.2.0)
      jekyll-theme-leap-day (= 0.2.0)
      jekyll-theme-merlot (= 0.2.0)
      jekyll-theme-midnight (= 0.2.0)
      jekyll-theme-minimal (= 0.2.0)
      jekyll-theme-modernist (= 0.2.0)
      jekyll-theme-primer (= 0.6.0)
      jekyll-theme-slate (= 0.2.0)
      jekyll-theme-tactile (= 0.2.0)
      jekyll-theme-time-machine (= 0.2.0)
      jekyll-titles-from-headings (= 0.5.3)
      jemoji (= 0.12.0)
      kramdown (= 2.3.1)
      kramdown-parser-gfm (= 1.1.0)
      liquid (= 4.0.3)
      mercenary (~> 0.3)
      minima (= 2.5.1)
      nokogiri (>= 1.10.4, < 2.0)
      rouge (= 3.26.0)
      terminal-table (~> 1.4)
    github-pages-health-check (1.17.9)
      addressable (~> 2.3)
      dnsruby (~> 1.60)
      octokit (~> 4.0)
      public_suffix (>= 3.0, < 5.0)
      typhoeus (~> 1.3)
    html-pipeline (2.14.0)
      activesupport (>= 2)
      nokogiri (>= 1.4)
    http_parser.rb (0.6.0)
    i18n (0.9.5)
      concurrent-ruby (~> 1.0)
    jekyll (3.9.0)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (~> 0.7)
      jekyll-sass-converter (~> 1.0)
      jekyll-watch (~> 2.0)
      kramdown (>= 1.17, < 3)
      liquid (~> 4.0)
      mercenary (~> 0.3.3)
      pathutil (~> 0.9)
      rouge (>= 1.7, < 4)
      safe_yaml (~> 1.0)
    jekyll-avatar (0.7.0)
      jekyll (>= 3.0, < 5.0)
    jekyll-coffeescript (1.1.1)
      coffee-script (~> 2.2)
      coffee-script-source (~> 1.11.1)
    jekyll-commonmark (1.3.1)
      commonmarker (~> 0.14)
      jekyll (>= 3.7, < 5.0)
    jekyll-commonmark-ghpages (0.1.6)
      commonmarker (~> 0.17.6)
      jekyll-commonmark (~> 1.2)
      rouge (>= 2.0, < 4.0)
    jekyll-default-layout (0.1.4)
      jekyll (~> 3.0)
    jekyll-feed (0.15.1)
      jekyll (>= 3.7, < 5.0)
    jekyll-gist (1.5.0)
      octokit (~> 4.2)
    jekyll-github-metadata (2.13.0)
      jekyll (>= 3.4, < 5.0)
      octokit (~> 4.0, != 4.4.0)
    jekyll-include-cache (0.2.1)
      jekyll (>= 3.7, < 5.0)
    jekyll-mentions (1.6.0)
      html-pipeline (~> 2.3)
      jekyll (>= 3.7, < 5.0)
    jekyll-optional-front-matter (0.3.2)
      jekyll (>= 3.0, < 5.0)
    jekyll-paginate (1.1.0)
    jekyll-readme-index (0.3.0)
      jekyll (>= 3.0, < 5.0)
    jekyll-redirect-from (0.16.0)
      jekyll (>= 3.3, < 5.0)
    jekyll-relative-links (0.6.1)
      jekyll (>= 3.3, < 5.0)
    jekyll-remote-theme (0.4.3)
      addressable (~> 2.0)
      jekyll (>= 3.5, < 5.0)
      jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
      rubyzip (>= 1.3.0, < 3.0)
    jekyll-sass-converter (1.5.2)
      sass (~> 3.4)
    jekyll-seo-tag (2.7.1)
      jekyll (>= 3.8, < 5.0)
    jekyll-sitemap (1.4.0)
      jekyll (>= 3.7, < 5.0)
    jekyll-swiss (1.0.0)
    jekyll-theme-architect (0.2.0)
      jekyll (> 3.5, < 5.0)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-cayman (0.2.0)
      jekyll (> 3.5, < 5.0)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-dinky (0.2.0)
      jekyll (> 3.5, < 5.0)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-hacker (0.2.0)
      jekyll (> 3.5, < 5.0)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-leap-day (0.2.0)
      jekyll (> 3.5, < 5.0)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-merlot (0.2.0)
      jekyll (> 3.5, < 5.0)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-midnight (0.2.0)
      jekyll (> 3.5, < 5.0)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-minimal (0.2.0)
      jekyll (> 3.5, < 5.0)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-modernist (0.2.0)
      jekyll (> 3.5, < 5.0)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-primer (0.6.0)
      jekyll (> 3.5, < 5.0)
      jekyll-github-metadata (~> 2.9)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-slate (0.2.0)
      jekyll (> 3.5, < 5.0)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-tactile (0.2.0)
      jekyll (> 3.5, < 5.0)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-time-machine (0.2.0)
      jekyll (> 3.5, < 5.0)
      jekyll-seo-tag (~> 2.0)
    jekyll-titles-from-headings (0.5.3)
      jekyll (>= 3.3, < 5.0)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    jemoji (0.12.0)
      gemoji (~> 3.0)
      html-pipeline (~> 2.2)
      jekyll (>= 3.0, < 5.0)
    kramdown (2.3.1)
      rexml
    kramdown-parser-gfm (1.1.0)
      kramdown (~> 2.0)
    liquid (4.0.3)
    listen (3.7.0)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    mercenary (0.3.6)
    minima (2.5.1)
      jekyll (>= 3.5, < 5.0)
      jekyll-feed (~> 0.9)
      jekyll-seo-tag (~> 2.1)
    minitest (5.14.4)
    multipart-post (2.1.1)
    nokogiri (1.12.5-x86_64-darwin)
      racc (~> 1.4)
    octokit (4.21.0)
      faraday (>= 0.9)
      sawyer (~> 0.8.0, >= 0.5.3)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    public_suffix (4.0.6)
    racc (1.5.2)
    rb-fsevent (0.11.0)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rexml (3.2.5)
    rouge (3.26.0)
    ruby-enum (0.9.0)
      i18n
    ruby2_keywords (0.0.5)
    rubyzip (2.3.2)
    safe_yaml (1.0.5)
    sass (3.7.4)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    sawyer (0.8.2)
      addressable (>= 2.3.5)
      faraday (> 0.8, < 2.0)
    simpleidn (0.2.1)
      unf (~> 0.1.4)
    terminal-table (1.8.0)
      unicode-display_width (~> 1.1, >= 1.1.1)
    thread_safe (0.3.6)
    typhoeus (1.4.0)
      ethon (>= 0.9.0)
    tzinfo (1.2.9)
      thread_safe (~> 0.1)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.8)
    unicode-display_width (1.8.0)
    zeitwerk (2.4.2)

PLATFORMS
  x86_64-darwin-19

DEPENDENCIES
  github-pages
  jekyll-feed
  jekyll-include-cache
  tzinfo
  tzinfo-data
  wdm (~> 0.1.1)

BUNDLED WITH
   2.2.29

— TEMPLATE END —————————————————————-

Troubleshooting common issues

Stuck using Bundler? Browse these common issues before filing a new issue.

Permission denied when installing bundler

Certain operating systems such as macOS and Ubuntu have versions of Ruby that require elevated privileges to install gems.

ERROR:  While executing gem ... (Gem::FilePermissionError)
  You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

There are multiple ways to solve this issue. You can install bundler with elevated privileges using sudo or su.

If you cannot elevate your privileges or do not want to globally install Bundler, you can use the --user-install option.

gem install bundler --user-install

This will install Bundler into your home directory. Note that you will need to append ~/.gem/ruby/<ruby version>/bin to your $PATH variable to use bundle.

Heroku errors

Please open a ticket with Heroku if you’re having trouble deploying. They have a professional support team who can help you resolve Heroku issues far better than the Bundler team can. If the problem that you are having turns out to be a bug in Bundler itself, Heroku support can get the exact details to us.

Other problems

First, figure out exactly what it is that you’re trying to do (see XY Problem). Then, go to the Bundler documentation website and see if we have instructions on how to do that.

Second, check the compatibility
list, and make sure that the version of Bundler that you are using works with the versions of Ruby and RubyGems that you are using. To see your versions:

# Bundler version
bundle -v

# Ruby version
ruby -v

# RubyGems version
gem -v

If these instructions don’t work, or you can’t find any appropriate instructions, you can try these troubleshooting steps:

# Update to the latest version of bundler
gem install bundler

# Remove user-specific gems and git repos
rm -rf ~/.bundle/ ~/.gem/bundler/ ~/.gems/cache/bundler/

# Remove system-wide git repos and git checkouts
rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/

# Remove project-specific settings
rm -rf .bundle/

# Remove project-specific cached gems and repos
rm -rf vendor/cache/

# Remove the saved resolve of the Gemfile
rm -rf Gemfile.lock

# Uninstall the rubygems-bundler and open_gem gems
rvm gemset use global # if using rvm
gem uninstall rubygems-bundler open_gem

# Try to install one more time
bundle install

If you are developing ruby applications within a virtual machine, you might
have run across a similar looking error when trying to run bundle install.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/vagrant/.rbenv/versions/2.1.1/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for sys/select.h... yes
checking for poll.h... yes
checking for sys/epoll.h... yes
checking for sys/event.h... no
checking for port.h... no
checking for sys/resource.h... yes
creating Makefile

Text file busy @ unlink_internal - ./siteconf20140504-1398-lxfrfm.rb

What’s causing the problem?

By default, bundler installs gems into a directory called vendor/bundle local
to your project. Consequently, if your current project directory is within a
shared folder between your VM and your host, bundler will attempt to install
gems and native extensions on this shared folder.

How do I fix it?

Thankfully there’s a simple solution that enables us to keep our ruby files on
the VM shared folder and keep the isolation provided by bundler/rbenv. We
simply need to tell bundler to install gems in a directory that’s local to the
VM (not on a shared folder). We can achieve this by altering the bundle config
file for the project.

Step 1

Since I primarily work with Python, I’m used to the virtualenv ecosystem where
all virtual environments for a project have directories within a ~/.env
directory. To mirror that, let’s create a directory called .bundles

Go ahead and cd to that directory and get the absolute path via pwd. We’ll need that next.

$ cd ~/.bundles
$ pwd
/home/vagrant/.bundles

Step 2

Now let’s move back to your ruby project directory. If you have a
.bundle/config file local to your project, open it in your favorite text
editor. Otherwise, create both the .bundle directory and a file called config
within that directory. (Note: The .bundle directory should be at the same level
as your project Gemfile).

Append the following to the file:

---
BUNDLE_PATH: "/home/vagrant/.bundles/YOUR_PROJECT_NAME_HERE"
BUNDLE_DISABLE_SHARED_GEMS: '1'

Step 3

Now we can finally execute

Upon completion, bundler will indicate where the gems were installed:

(vagrant)/vagrant/ruby/projects/eztemp.me$ bundle
Using timers 1.1.0
Using celluloid 0.15.2
Using nio4r 1.0.0
Using celluloid-io 0.15.0
Using ffi 1.9.3
Using rb-fsevent 0.9.4
Using rb-inotify 0.9.4
Using listen 2.7.4
Using rack 1.5.2
Using rack-protection 1.5.3
Using rerun 0.9.0
Using tilt 1.4.1
Using sinatra 1.4.5
Using bundler 1.6.2
Your bundle is complete!
It was installed into /home/vagrant/.bundles/eztemp

Ensure this directory is the one you specified.

The takeaway

As a general rule of thumb, package managers on your VM should download and
write to the VM only. Difficulties arising from package managers interacting
with virtual machine shared folders is not limited to ruby. Python’s virtualenv
ecosystem can similarly stop working if the virtualenv is located on a shared
folder instead of remaining local to the VM.

Понравилась статья? Поделить с друзьями:

Не пропустите эти материалы по теме:

  • Яндекс еда ошибка привязки карты
  • Bully ошибка 0xc000007b
  • Bulletstorm full clip edition ошибка при запуске
  • Bulletsharp dll ошибка 3ds max
  • Bulb monitoring ошибка

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии