New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not a git repository..... Fatal Error #1787

Closed
iguana251 opened this Issue Mar 22, 2012 · 4 comments

Comments

Projects
None yet
5 participants
@iguana251

iguana251 commented Mar 22, 2012

I don't know if this has been covered. My apologies if it has but I received the following error when trying to set up FatFree CRM. I am new to this product and the environment so I am not completely sure if the instructions are correct. I do notice the install instructions have some inconsistancies with the use of "production" and "development". Not sure if that means anything.

Here is the error I am receiving:

fatal: Not a git repository (or any of the parent directories): .git
Unfortunately, a fatal error has occurred. Please report this error to the Bundl
er issue tracker at https://github.com/carlhuda/bundler/issues so that we can fi
x it. Please include the full output of the command, your Gemfile and Gemfile.lo
ck. Thanks!
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.2/lib/bundler.r
b:271:in `initialize': can't convert nil into String (TypeError)
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.2/
lib/bundler.rb:271:in `new'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.2/
lib/bundler.rb:271:in `load_gemspec'
        from C:/RailsInstaller/fat_free_crm/Gemfile:20:in `evaluate'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.2/
lib/bundler/dsl.rb:7:in `instance_eval'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.2/
lib/bundler/dsl.rb:7:in `evaluate'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.2/
lib/bundler/definition.rb:18:in `build'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.2/
lib/bundler.rb:135:in `definition'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.2/
lib/bundler/cli.rb:220:in `install'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.2/
lib/bundler/vendor/thor/task.rb:22:in `run'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.2/
lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.2/
lib/bundler/vendor/thor.rb:263:in `dispatch'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.2/
lib/bundler/vendor/thor/base.rb:386:in `start'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.2/
bin/bundle:13:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.3/bin/bundle:19:in `load'
        from C:/RailsInstaller/Ruby1.9.3/bin/bundle:19:in `<main>'

The Genfile.lock file is as follows

GIT
  remote: git://github.com/fatfreecrm/chosen-rails.git
  revision: 33c92a8554ee14d11b7293eb531371a05c0a0b67
  specs:
    chosen-rails (0.9.5)
      railties (~> 3.0)
      thor (~> 0.14)

GIT
  remote: git://github.com/fatfreecrm/ransack.git
  revision: 92f5812d4320e5f1959f844d19d0386bb5654a08
  specs:
    ransack (0.6.0)
      actionpack (~> 3.0)
      activerecord (~> 3.0)
      chronic (~> 0.6.7)
      polyamorous (~> 0.5.0)

GIT
  remote: https://github.com/LessonPlanet/responds_to_parent.git
  revision: 1f0c6d82eda5e7f331a30fc029e7ead2a7dbdebf
  specs:
    responds_to_parent (1.0.20091013)

PATH
  remote: .
  specs:

GEM
  remote: http://rubygems.org/
  specs:
    actionmailer (3.2.2)
      actionpack (= 3.2.2)
      mail (~> 2.4.0)
    actionpack (3.2.2)
      activemodel (= 3.2.2)
      activesupport (= 3.2.2)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      journey (~> 1.0.1)
      rack (~> 1.4.0)
      rack-cache (~> 1.1)
      rack-test (~> 0.6.1)
      sprockets (~> 2.1.2)
    activemodel (3.2.2)
      activesupport (= 3.2.2)
      builder (~> 3.0.0)
    activerecord (3.2.2)
      activemodel (= 3.2.2)
      activesupport (= 3.2.2)
      arel (~> 3.0.2)
      tzinfo (~> 0.3.29)
    activeresource (3.2.2)
      activemodel (= 3.2.2)
      activesupport (= 3.2.2)
    activesupport (3.2.2)
      i18n (~> 0.6)
      multi_json (~> 1.0)
    acts-as-taggable-on (2.2.2)
      rails (~> 3.0)
    acts_as_commentable (3.0.1)
    acts_as_list (0.1.5)
    ajax-chosen-rails (0.1.5)
      chosen-rails
      railties (~> 3.0)
      thor (~> 0.14)
    archive-tar-minitar (0.5.2)
    arel (3.0.2)
    authlogic (3.1.0)
      activerecord (>= 3.0.7)
      activerecord (>= 3.0.7)
    builder (3.0.0)
    capybara (1.1.2)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      selenium-webdriver (~> 2.0)
      xpath (~> 0.1.4)
    childprocess (0.3.1)
      ffi (~> 1.0.6)
    chronic (0.6.7)
    cocaine (0.2.1)
    coffee-rails (3.2.2)
      coffee-script (>= 2.2.0)
      railties (~> 3.2.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.2.0)
    columnize (0.3.6)
    database_cleaner (0.7.1)
    diff-lcs (1.1.3)
    dynamic_form (1.1.4)
    erubis (2.7.0)
    execjs (1.3.0)
      multi_json (~> 1.0)
    factory_girl (2.6.1)
      activesupport (>= 2.3.9)
    factory_girl_rails (1.7.0)
      factory_girl (~> 2.6.0)
      railties (>= 3.0.0)
    ffaker (1.13.0)
    ffi (1.0.11)
    fuubar (1.0.0)
      rspec (~> 2.0)
      rspec-instafail (~> 0.2.0)
      ruby-progressbar (~> 0.0.10)
    haml (3.1.4)
    headless (0.2.2)
    hike (1.2.1)
    i18n (0.6.0)
    journey (1.0.3)
    jquery-rails (2.0.1)
      railties (>= 3.2.0, < 5.0)
      thor (~> 0.14)
    json (1.6.5)
    libv8 (3.3.10.4)
    linecache (0.46)
      rbx-require-relative (> 0.0.4)
    linecache19 (0.5.12)
      ruby_core_source (>= 0.1.4)
    mail (2.4.1)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.17.2)
    multi_json (1.1.0)
    nokogiri (1.5.0)
    paper_trail (2.6.0)
      rails (~> 3)
    paperclip (2.7.0)
      activerecord (>= 2.3.0)
      activesupport (>= 2.3.2)
      cocaine (>= 0.0.2)
      mime-types
    pg (0.13.2)
    polyamorous (0.5.0)
      activerecord (~> 3.0)
    polyglot (0.3.3)
    prototype-rails (3.2.1)
      rails (~> 3.2)
    rack (1.4.1)
    rack-cache (1.1)
      rack (>= 0.4)
    rack-ssl (1.3.2)
      rack
    rack-test (0.6.1)
      rack (>= 1.0)
    rails (3.2.2)
      actionmailer (= 3.2.2)
      actionpack (= 3.2.2)
      activerecord (= 3.2.2)
      activeresource (= 3.2.2)
      activesupport (= 3.2.2)
      bundler (~> 1.0)
      railties (= 3.2.2)
    railties (3.2.2)
      actionpack (= 3.2.2)
      activesupport (= 3.2.2)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (~> 0.14.6)
    rake (0.9.2.2)
    rbx-require-relative (0.0.9)
    rdoc (3.12)
      json (~> 1.4)
    rspec (2.8.0)
      rspec-core (~> 2.8.0)
      rspec-expectations (~> 2.8.0)
      rspec-mocks (~> 2.8.0)
    rspec-core (2.8.0)
    rspec-expectations (2.8.0)
      diff-lcs (~> 1.1.2)
    rspec-instafail (0.2.2)
    rspec-mocks (2.8.0)
    rspec-rails (2.8.1)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec (~> 2.8.0)
    ruby-debug (0.10.4)
      columnize (>= 0.1)
      ruby-debug-base (~> 0.10.4.0)
    ruby-debug-base (0.10.4)
      linecache (>= 0.3)
    ruby-debug-base19 (0.11.25)
      columnize (>= 0.3.1)
      linecache19 (>= 0.5.11)
      ruby_core_source (>= 0.1.4)
    ruby-debug19 (0.11.6)
      columnize (>= 0.3.1)
      linecache19 (>= 0.5.11)
      ruby-debug-base19 (>= 0.11.19)
    ruby-progressbar (0.0.10)
    ruby_core_source (0.1.5)
      archive-tar-minitar (>= 0.5.2)
    rubyzip (0.9.6.1)
    sass (3.1.15)
    sass-rails (3.2.4)
      railties (~> 3.2.0)
      sass (>= 3.1.10)
      tilt (~> 1.3)
    selenium-webdriver (2.20.0)
      childprocess (>= 0.2.5)
      ffi (~> 1.0)
      multi_json (~> 1.0)
      rubyzip
    simple_form (2.0.1)
      actionpack (~> 3.0)
      activemodel (~> 3.0)
    spork (0.9.0)
    sprockets (2.1.2)
      hike (~> 1.2)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    steak (2.0.0)
      capybara (>= 1.0.0)
      rspec-rails (>= 2.5.0)
    therubyracer (0.9.10)
      libv8 (~> 3.3.10)
    thor (0.14.6)
    tilt (1.3.3)
    treetop (1.4.10)
      polyglot
      polyglot (>= 0.3.1)
    tzinfo (0.3.31)
    uglifier (1.2.3)
      execjs (>= 0.3.0)
      multi_json (>= 1.0.2)
    will_paginate (3.0.3)
    xpath (0.1.4)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  acts-as-taggable-on (~> 2.2.1)
  acts_as_commentable (~> 3.0.1)
  acts_as_list (~> 0.1.4)
  ajax-chosen-rails (>= 0.1.5)
  authlogic (~> 3.1.0)
  capybara
  chosen-rails!
  coffee-rails (~> 3.2.1)
  database_cleaner
  dynamic_form
  factory_girl (~> 2.6.1)
  factory_girl_rails (~> 1.7.0)
  ffaker (>= 1.12.0)
  fuubar
  haml (~> 3.1.3)
  headless
  jquery-rails
  paper_trail
  paperclip (~> 2.7.0)
  pg (~> 0.13.2)
  prototype-rails
  rails (~> 3.2.2)
  ransack!
  responds_to_parent!
  rspec-rails
  ruby-debug
  ruby-debug19
  sass (~> 3.1.15)
  sass-rails (~> 3.2.3)
  simple_form (~> 2.0.1)
  spork
  steak
  therubyracer
  uglifier (>= 1.0.3)
  will_paginate (~> 3.0.2)

The Gemfile is as follows

source :rubygems

# Removes a gem dependency
def remove(name)
  @dependencies.reject! {|d| d.name == name }
end

# Replaces an existing gem dependency (e.g. from gemspec) with an alternate source.
def gem(name, *args)
  remove(name)
  super
end

# Load development dependencies from gemspec
gemspec

# Bundler no longer treats runtime dependencies as base dependencies.
# The following code restores this behaviour.
# (See https://github.com/carlhuda/bundler/issues/1041)
spec = Bundler.load_gemspec(Dir["./{,*}.gemspec"].first)
spec.runtime_dependencies.each do |dep|
  gem dep.name, *(dep.requirement.as_list)
end

gem 'ransack',      :git => "git://github.com/fatfreecrm/ransack.git"
gem 'chosen-rails', :git => "git://github.com/fatfreecrm/chosen-rails.git"
gem 'responds_to_parent', :git => "https://github.com/LessonPlanet/responds_to_parent.git"

# Remove fat_free_crm from dependencies, to stop it from being auto-required.
remove 'fat_free_crm'

gem 'pg', '~> 0.13.2'

group :development, :test do
  gem 'rspec-rails'
  gem 'steak', :require => false
  gem 'headless'
  unless ENV["CI"]
    gem 'ruby-debug',   :platform => :mri_18
    gem 'ruby-debug19', :platform => :mri_19
  end
end


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'therubyracer', :platform => :ruby  # C Ruby (MRI) or Rubinius, but NOT Windows
  gem 'uglifier',     '>= 1.0.3'
end
@radar

This comment has been minimized.

Show comment
Hide comment
@radar

radar Mar 22, 2012

Contributor

Please remember to format your code with three backticks to begin it and then another three to end it. This would prevent GitHub making a mess of it as it was written initially.

Contributor

radar commented Mar 22, 2012

Please remember to format your code with three backticks to begin it and then another three to end it. This would prevent GitHub making a mess of it as it was written initially.

@rohit

This comment has been minimized.

Show comment
Hide comment
@rohit

rohit Nov 13, 2012

Contributor

@iguana251 Hello, was this problem resolved? If not can you please try with latest version of Bundler?

Contributor

rohit commented Nov 13, 2012

@iguana251 Hello, was this problem resolved? If not can you please try with latest version of Bundler?

@xaviershay xaviershay closed this Aug 11, 2013

@xaviershay

This comment has been minimized.

Show comment
Hide comment
@xaviershay

xaviershay Aug 11, 2013

Contributor

This is likely an issue with FatFree CRM if they are still adding those hacks around runtime dependencies.

Contributor

xaviershay commented Aug 11, 2013

This is likely an issue with FatFree CRM if they are still adding those hacks around runtime dependencies.

@btihen

This comment has been minimized.

Show comment
Hide comment
@btihen

btihen Nov 25, 2017

i get the above error in a blank directory when running:

bundle init

however everything works fine if I create the Gemfile by hand and then run:

bundle install

bundle init
fatal: Not a git repository (or any of the parent directories): .git
--- 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 /Users/btihen/.rbenv/versions/2.4.2/bin/bundle init

  • What did you expect to happen?

    I expected Bundler to... create a Gemfile

  • What happened instead?

    Instead, what happened was... this error

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

    I tried... bundler works when I create a Gemfile and then run bundle init --

I used:

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end

ruby '2.4.2'

gem 'rspec'

Backtrace

Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/templates/Gemfile
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:1289:in `initialize'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:1289:in `open'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:1289:in `copy_file'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:430:in `copy_file'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:357:in `block in cp'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:1461:in `block in fu_each_src_dest'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:1477:in `fu_each_src_dest0'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:1459:in `fu_each_src_dest'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:356:in `cp'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli/init.rb:30:in `run'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:148:in `init'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:27:in `dispatch'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:18:in `start'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/exe/bundle:30:in `block in <top (required)>'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/friendly_errors.rb:122:in `with_friendly_errors'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/exe/bundle:22:in `<top (required)>'
  /Users/btihen/.rbenv/versions/2.4.2/bin/bundle:23:in `load'
  /Users/btihen/.rbenv/versions/2.4.2/bin/bundle:23:in `<main>'

Environment

Bundler       1.16.0
  Platforms   ruby, x86_64-darwin-16
Ruby          2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16]
  Full Path   /Users/btihen/.rbenv/versions/2.4.2/bin/ruby
  Config Dir  /Users/btihen/.rbenv/versions/2.4.2/etc
RubyGems      2.7.1
  Gem Home    /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0
  Gem Path    /Users/btihen/.gem/ruby/2.4.0:/Users/btihen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0
  User Path   /Users/btihen/.gem/ruby/2.4.0
  Bin Dir     /Users/btihen/.rbenv/versions/2.4.2/bin
Tools         
  Git         2.15.0
  RVM         not installed
  rbenv       rbenv 1.1.1

  chruby      not installed

Bundler Build Metadata

Built At          2017-11-25
Git SHA           
Released Version  false

Bundler settings

gem.test
  Set for the current user (/Users/btihen/.bundle/config): "rspec"
gem.mit
  Set for the current user (/Users/btihen/.bundle/config): true
gem.coc
  Set for the current user (/Users/btihen/.bundle/config): true

--- TEMPLATE END ----------------------------------------------------------------

Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/bundler/bundler/search?q=No+such+file+or+directory+%40+rb_sysopen+-+%2FUsers%2Fbtihen%2F.rbenv%2Fversions%2F2.4.2%2Flib%2Fruby%2Fsite_ruby%2F2.4.0%2Fbundler%2Ftemplates%2FGemfile&type=Issues

If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
https://github.com/bundler/bundler/issues/new

after bundle install

bundle env
fatal: Not a git repository (or any of the parent directories): .git

Environment

Bundler       1.16.0
  Platforms   ruby, x86_64-darwin-16
Ruby          2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16]
  Full Path   /Users/btihen/.rbenv/versions/2.4.2/bin/ruby
  Config Dir  /Users/btihen/.rbenv/versions/2.4.2/etc
RubyGems      2.7.1
  Gem Home    /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0
  Gem Path    /Users/btihen/.gem/ruby/2.4.0:/Users/btihen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0
  User Path   /Users/btihen/.gem/ruby/2.4.0
  Bin Dir     /Users/btihen/.rbenv/versions/2.4.2/bin
Tools         
  Git         2.15.0
  RVM         not installed
  rbenv       rbenv 1.1.1

  chruby      not installed

Bundler Build Metadata

Built At          2017-11-25
Git SHA           
Released Version  false

Bundler settings

gem.test
  Set for the current user (/Users/btihen/.bundle/config): "rspec"
gem.mit
  Set for the current user (/Users/btihen/.bundle/config): true
gem.coc
  Set for the current user (/Users/btihen/.bundle/config): true

Gemfile

Gemfile

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end

ruby '2.4.2'

gem 'openapply'

gem 'rspec'

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    axlsx (2.1.0.pre)
      htmlentities (~> 4.3.1)
      nokogiri (>= 1.4.1)
      rubyzip (~> 1.1.7)
    diff-lcs (1.3)
    htmlentities (4.3.4)
    httparty (0.15.6)
      multi_xml (>= 0.5.2)
    json (2.1.0)
    mini_portile2 (2.3.0)
    multi_xml (0.6.0)
    net-scp (1.2.1)
      net-ssh (>= 2.6.5)
    net-ssh (4.2.0)
    nokogiri (1.8.1)
      mini_portile2 (~> 2.3.0)
    openapply (0.2.3)
      axlsx (= 2.1.0.pre)
      httparty (~> 0.15)
      json (~> 2.1)
      net-scp (~> 1.2)
      net-ssh (~> 4.2)
    rspec (3.7.0)
      rspec-core (~> 3.7.0)
      rspec-expectations (~> 3.7.0)
      rspec-mocks (~> 3.7.0)
    rspec-core (3.7.0)
      rspec-support (~> 3.7.0)
    rspec-expectations (3.7.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.7.0)
    rspec-mocks (3.7.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.7.0)
    rspec-support (3.7.0)
    rubyzip (1.1.7)

PLATFORMS
  ruby

DEPENDENCIES
  openapply
  rspec

RUBY VERSION
   ruby 2.4.2p198

BUNDLED WITH
   1.16.0

btihen commented Nov 25, 2017

i get the above error in a blank directory when running:

bundle init

however everything works fine if I create the Gemfile by hand and then run:

bundle install

bundle init
fatal: Not a git repository (or any of the parent directories): .git
--- 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 /Users/btihen/.rbenv/versions/2.4.2/bin/bundle init

  • What did you expect to happen?

    I expected Bundler to... create a Gemfile

  • What happened instead?

    Instead, what happened was... this error

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

    I tried... bundler works when I create a Gemfile and then run bundle init --

I used:

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end

ruby '2.4.2'

gem 'rspec'

Backtrace

Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/templates/Gemfile
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:1289:in `initialize'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:1289:in `open'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:1289:in `copy_file'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:430:in `copy_file'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:357:in `block in cp'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:1461:in `block in fu_each_src_dest'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:1477:in `fu_each_src_dest0'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:1459:in `fu_each_src_dest'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/fileutils/lib/fileutils.rb:356:in `cp'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli/init.rb:30:in `run'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:148:in `init'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:27:in `dispatch'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:18:in `start'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/exe/bundle:30:in `block in <top (required)>'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/friendly_errors.rb:122:in `with_friendly_errors'
  /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/exe/bundle:22:in `<top (required)>'
  /Users/btihen/.rbenv/versions/2.4.2/bin/bundle:23:in `load'
  /Users/btihen/.rbenv/versions/2.4.2/bin/bundle:23:in `<main>'

Environment

Bundler       1.16.0
  Platforms   ruby, x86_64-darwin-16
Ruby          2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16]
  Full Path   /Users/btihen/.rbenv/versions/2.4.2/bin/ruby
  Config Dir  /Users/btihen/.rbenv/versions/2.4.2/etc
RubyGems      2.7.1
  Gem Home    /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0
  Gem Path    /Users/btihen/.gem/ruby/2.4.0:/Users/btihen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0
  User Path   /Users/btihen/.gem/ruby/2.4.0
  Bin Dir     /Users/btihen/.rbenv/versions/2.4.2/bin
Tools         
  Git         2.15.0
  RVM         not installed
  rbenv       rbenv 1.1.1

  chruby      not installed

Bundler Build Metadata

Built At          2017-11-25
Git SHA           
Released Version  false

Bundler settings

gem.test
  Set for the current user (/Users/btihen/.bundle/config): "rspec"
gem.mit
  Set for the current user (/Users/btihen/.bundle/config): true
gem.coc
  Set for the current user (/Users/btihen/.bundle/config): true

--- TEMPLATE END ----------------------------------------------------------------

Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/bundler/bundler/search?q=No+such+file+or+directory+%40+rb_sysopen+-+%2FUsers%2Fbtihen%2F.rbenv%2Fversions%2F2.4.2%2Flib%2Fruby%2Fsite_ruby%2F2.4.0%2Fbundler%2Ftemplates%2FGemfile&type=Issues

If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
https://github.com/bundler/bundler/issues/new

after bundle install

bundle env
fatal: Not a git repository (or any of the parent directories): .git

Environment

Bundler       1.16.0
  Platforms   ruby, x86_64-darwin-16
Ruby          2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16]
  Full Path   /Users/btihen/.rbenv/versions/2.4.2/bin/ruby
  Config Dir  /Users/btihen/.rbenv/versions/2.4.2/etc
RubyGems      2.7.1
  Gem Home    /Users/btihen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0
  Gem Path    /Users/btihen/.gem/ruby/2.4.0:/Users/btihen/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0
  User Path   /Users/btihen/.gem/ruby/2.4.0
  Bin Dir     /Users/btihen/.rbenv/versions/2.4.2/bin
Tools         
  Git         2.15.0
  RVM         not installed
  rbenv       rbenv 1.1.1

  chruby      not installed

Bundler Build Metadata

Built At          2017-11-25
Git SHA           
Released Version  false

Bundler settings

gem.test
  Set for the current user (/Users/btihen/.bundle/config): "rspec"
gem.mit
  Set for the current user (/Users/btihen/.bundle/config): true
gem.coc
  Set for the current user (/Users/btihen/.bundle/config): true

Gemfile

Gemfile

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end

ruby '2.4.2'

gem 'openapply'

gem 'rspec'

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    axlsx (2.1.0.pre)
      htmlentities (~> 4.3.1)
      nokogiri (>= 1.4.1)
      rubyzip (~> 1.1.7)
    diff-lcs (1.3)
    htmlentities (4.3.4)
    httparty (0.15.6)
      multi_xml (>= 0.5.2)
    json (2.1.0)
    mini_portile2 (2.3.0)
    multi_xml (0.6.0)
    net-scp (1.2.1)
      net-ssh (>= 2.6.5)
    net-ssh (4.2.0)
    nokogiri (1.8.1)
      mini_portile2 (~> 2.3.0)
    openapply (0.2.3)
      axlsx (= 2.1.0.pre)
      httparty (~> 0.15)
      json (~> 2.1)
      net-scp (~> 1.2)
      net-ssh (~> 4.2)
    rspec (3.7.0)
      rspec-core (~> 3.7.0)
      rspec-expectations (~> 3.7.0)
      rspec-mocks (~> 3.7.0)
    rspec-core (3.7.0)
      rspec-support (~> 3.7.0)
    rspec-expectations (3.7.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.7.0)
    rspec-mocks (3.7.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.7.0)
    rspec-support (3.7.0)
    rubyzip (1.1.7)

PLATFORMS
  ruby

DEPENDENCIES
  openapply
  rspec

RUBY VERSION
   ruby 2.4.2p198

BUNDLED WITH
   1.16.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment