chatwoot / chatwoot

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬
https://www.chatwoot.com/help-center
Other
21.07k stars 3.52k forks source link

can't install on 'develop' or on 'MASTER' either #10052

Closed palladius closed 1 month ago

palladius commented 2 months ago

Describe the bug

can't install either master or develop branches on my Debian.

To Reproduce

repro

  1. git clone https://github.com/chatwoot/chatwoot
  2. cd chatwoot
  3. bundle install

=>

Looking up gems ["ansi"]
Fetching https://github.com/chatwoot/azure-storage-ruby
Bundler::Source::Git::GitCommandError: Git error: command `git rev-parse --verify HEAD` in directory /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/azure-storage-ruby-bcc8dd7469fbc5f447c561e2a79b3385215a794b has failed.
fatal: cannot use bare repository '/home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/azure-storage-ruby-bcc8dd7469fbc5f447c561e2a79b3385215a794b' (safe.bareRepository is 'explicit')

More on my env


ricc@derek:~/git/tmp/chat-app/chatwoot-master$ bundle --version
Bundler version 2.5.16
ricc@derek:~/git/tmp/chat-app/chatwoot-master$ ruby --version
ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [x86_64-linux]

Long error:

$ bundle install
Running `bundle install` with bundler 2.5.16
Resolving dependencies because there's no lockfile
Fetching https://github.com/chatwoot/html2text_ruby
Retrying `git fetch --force --quiet --no-tags --depth 1 -- https://github.com/chatwoot/html2text_ruby refs/heads/chatwoot:refs/heads/chatwoot` at /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/html2text_ruby-ca2ecf59dd4970165f7fca8c2eb9829e032a2586 due to error (2/4): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --no-tags --depth 1 -- https://github.com/chatwoot/html2text_ruby refs/heads/chatwoot:refs/heads/chatwoot` in directory /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/html2text_ruby-ca2ecf59dd4970165f7fca8c2eb9829e032a2586 has failed.
fatal: cannot use bare repository '/home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/html2text_ruby-ca2ecf59dd4970165f7fca8c2eb9829e032a2586' (safe.bareRepository is 'explicit')
Retrying `git fetch --force --quiet --no-tags --depth 1 -- https://github.com/chatwoot/html2text_ruby refs/heads/chatwoot:refs/heads/chatwoot` at /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/html2text_ruby-ca2ecf59dd4970165f7fca8c2eb9829e032a2586 due to error (3/4): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --no-tags --depth 1 -- https://github.com/chatwoot/html2text_ruby refs/heads/chatwoot:refs/heads/chatwoot` in directory /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/html2text_ruby-ca2ecf59dd4970165f7fca8c2eb9829e032a2586 has failed.
fatal: cannot use bare repository '/home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/html2text_ruby-ca2ecf59dd4970165f7fca8c2eb9829e032a2586' (safe.bareRepository is 'explicit')
Retrying `git fetch --force --quiet --no-tags --depth 1 -- https://github.com/chatwoot/html2text_ruby refs/heads/chatwoot:refs/heads/chatwoot` at /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/html2text_ruby-ca2ecf59dd4970165f7fca8c2eb9829e032a2586 due to error (4/4): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --no-tags --depth 1 -- https://github.com/chatwoot/html2text_ruby refs/heads/chatwoot:refs/heads/chatwoot` in directory /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/html2text_ruby-ca2ecf59dd4970165f7fca8c2eb9829e032a2586 has failed.
fatal: cannot use bare repository '/home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/html2text_ruby-ca2ecf59dd4970165f7fca8c2eb9829e032a2586' (safe.bareRepository is 'explicit')
Bundler::Source::Git::GitCommandError: Git error: command `git fetch --force --quiet --no-tags --depth 1 -- https://github.com/chatwoot/html2text_ruby refs/heads/chatwoot:refs/heads/chatwoot` in directory /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/html2text_ruby-ca2ecf59dd4970165f7fca8c2eb9829e032a2586 has failed.
fatal: cannot use bare repository '/home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/html2text_ruby-ca2ecf59dd4970165f7fca8c2eb9829e032a2586' (safe.bareRepository is 'explicit')

/home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/source/git/git_proxy.rb:163:in `block in git_remote_fetch'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/retry.rb:40:in `run'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/retry.rb:30:in `attempt'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/source/git/git_proxy.rb:156:in `git_remote_fetch'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/source/git/git_proxy.rb:111:in `checkout'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/source/git.rb:366:in `fetch'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/source/git.rb:193:in `specs'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/source.rb:60:in `spec_names'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/source_map.rb:21:in `block in all_requirements'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/source_map.rb:20:in `map'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/source_map.rb:20:in `all_requirements'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/definition.rb:976:in `source_requirements'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/definition.rb:571:in `resolution_packages'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/definition.rb:553:in `resolver'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/definition.rb:633:in `start_resolution'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/definition.rb:305:in `resolve'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/definition.rb:179:in `resolve_remotely!'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/installer.rb:256:in `resolve_if_needed'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/installer.rb:80:in `block in run'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/process_lock.rb:12:in `block in lock'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/process_lock.rb:9:in `open'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/process_lock.rb:9:in `lock'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/installer.rb:71:in `run'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/installer.rb:23:in `install'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/cli/install.rb:63:in `run'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/cli.rb:247:in `block in install'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/settings.rb:158:in `temporary'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/cli.rb:246:in `install'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/cli.rb:35:in `dispatch'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/cli.rb:29:in `start'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/exe/bundle:28:in `block in <top (required)>'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
  /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/exe/bundle:20:in `<top (required)>'
  /home/ricc/.rbenv/versions/3.3.3/bin/bundle:25:in `load'
  /home/ricc/.rbenv/versions/3.3.3/bin/bundle:25:in `<main>'

Expected behavior

No response

Environment

Linux VM

Cloud Provider

None

Platform

None

Operating system

Linux Debian

Browser and version

No response

Docker (if applicable)

No response

Additional context

No response

linear[bot] commented 2 months ago

PR-1320 can't install on 'develop' or on 'MASTER' either

sojan-official commented 2 months ago

@palladius are you trying to set up a dev machine? It seems like a git config issue. please see the directions from ChatGPT


The error message indicates that Bundler encountered an issue when trying to fetch the azure-storage-ruby gem from a Git repository. The specific error is related to the Git command failing due to the repository being bare and the safe.bareRepository setting being set to 'explicit'. Here's how you can address this issue:

Steps to Resolve the Error:

  1. Check Git Configuration: Ensure that your Git configuration allows operations on bare repositories. You can set this explicitly using:

    git config --global safe.bareRepository all
  2. Clean the Bundler Cache: Sometimes the local cache may be corrupted. Try clearing it:

    bundle cache clean --all
  3. Remove and Reinstall the Gem: Delete the cached Git repository and retry:

    rm -rf /home/ricc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/azure-storage-ruby-bcc8dd7469fbc5f447c561e2a79b3385215a794b
    bundle install
  4. Explicitly Clone the Repository: If the above steps don't resolve the issue, try manually cloning the repository to a local directory and pointing your Gemfile to it:

    git clone https://github.com/chatwoot/azure-storage-ruby.git /path/to/local/repo

    Then, update your Gemfile to reference the local path:

    gem 'azure-storage-ruby', path: '/path/to/local/repo'
  5. Update Bundler and Git: Ensure you have the latest versions of Bundler and Git, as bugs in older versions might cause such issues:

    gem install bundler
  6. Check Permissions: Make sure you have the necessary read and write permissions for the directories involved. You may need to adjust permissions or run commands with sudo if necessary.

These steps should help resolve the Git error and allow you to continue with your development setup. If you continue to encounter issues, it might be related to how the repository is configured on GitHub, and further investigation might be needed into the repository's settings or contents.

pranavrajs commented 1 month ago

Seems like an issue outside of the Chatwoot repo. Please re-open this if you think this is a issue with Chatwoot codebase.