解決したいこと
プログラミング初心者です。
現在、個人で作成したアプリをデプロイしようとしています。
しかし、GitHubにアプリをコミットしようとすると、Argument list too longとエラーが生じます。
$ git commit -m "add-bundle" /usr/local/Cellar/git/2.26.1_1/libexec/git-core/git: Argument list too long
恐らく、commitしようとしているファイル数が多くこのようなエラーが発生していると思うのですが、
解決方法がわかりません。
どうしたらこの大量のファイルをコミットできるのか教えていただきたいです。
現在の状況
Rubyのバージョンを上げた際に、Railsが起動しなくなり、
bundle install --path vendor/cache
でgemをインストールし直しました。(大量のgem関連のファイルが生成されました)
なお、実行後はローカル環境で無事にrailsが動くようになりました。
ターミナルで表示されていたコードは以下のとおりです。
$ bundle install --path vendor/cache [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path 'vendor/cache'`, and stop using this flag The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. Fetching gem metadata from https://rubygems.org/............ Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Fetching rake 13.0.1 Installing rake 13.0.1 Fetching concurrent-ruby 1.1.6 Installing concurrent-ruby 1.1.6 Fetching i18n 1.8.2 Installing i18n 1.8.2 Fetching minitest 5.14.1 Installing minitest 5.14.1 Fetching thread_safe 0.3.6 Installing thread_safe 0.3.6 Fetching tzinfo 1.2.7 Installing tzinfo 1.2.7 Fetching activesupport 5.0.7.2 Installing activesupport 5.0.7.2 Fetching builder 3.2.4 Installing builder 3.2.4 Fetching erubis 2.7.0 Installing erubis 2.7.0 Fetching mini_portile2 2.4.0 Installing mini_portile2 2.4.0 Fetching nokogiri 1.10.9 Installing nokogiri 1.10.9 with native extensions Fetching rails-dom-testing 2.0.3 Installing rails-dom-testing 2.0.3 Fetching crass 1.0.6 Installing crass 1.0.6 Fetching loofah 2.5.0 Installing loofah 2.5.0 Fetching rails-html-sanitizer 1.3.0 Installing rails-html-sanitizer 1.3.0 Fetching actionview 5.0.7.2 Installing actionview 5.0.7.2 Fetching rack 2.2.2 Installing rack 2.2.2 Fetching rack-test 0.6.3 Installing rack-test 0.6.3 Fetching actionpack 5.0.7.2 Installing actionpack 5.0.7.2 Fetching nio4r 2.5.2 Installing nio4r 2.5.2 with native extensions Fetching websocket-extensions 0.1.4 Installing websocket-extensions 0.1.4 Fetching websocket-driver 0.6.5 Installing websocket-driver 0.6.5 with native extensions Fetching actioncable 5.0.7.2 Installing actioncable 5.0.7.2 Fetching globalid 0.4.2 Installing globalid 0.4.2 Fetching activejob 5.0.7.2 Installing activejob 5.0.7.2 Fetching mini_mime 1.0.2 Installing mini_mime 1.0.2 Fetching mail 2.7.1 Installing mail 2.7.1 Fetching actionmailer 5.0.7.2 Installing actionmailer 5.0.7.2 Fetching activemodel 5.0.7.2 Installing activemodel 5.0.7.2 Fetching arel 7.1.4 Installing arel 7.1.4 Fetching activerecord 5.0.7.2 Installing activerecord 5.0.7.2 Fetching public_suffix 4.0.5 Installing public_suffix 4.0.5 Fetching addressable 2.7.0 Installing addressable 2.7.0 Fetching bcrypt 3.1.13 Installing bcrypt 3.1.13 with native extensions Fetching bindex 0.8.1 Installing bindex 0.8.1 with native extensions Using bundler 2.1.4 Fetching byebug 11.1.3 Installing byebug 11.1.3 with native extensions Fetching mini_magick 4.10.1 Installing mini_magick 4.10.1 Fetching ffi 1.12.2 Installing ffi 1.12.2 with native extensions Fetching ruby-vips 2.0.17 Installing ruby-vips 2.0.17 Fetching image_processing 1.10.3 Installing image_processing 1.10.3 Fetching mimemagic 0.3.5 Installing mimemagic 0.3.5 Fetching carrierwave 2.1.0 Installing carrierwave 2.1.0 Fetching coderay 1.1.2 Installing coderay 1.1.2 Fetching coffee-script-source 1.12.2 Installing coffee-script-source 1.12.2 Fetching execjs 2.7.0 Installing execjs 2.7.0 Fetching coffee-script 2.4.1 Installing coffee-script 2.4.1 Fetching method_source 1.0.0 Installing method_source 1.0.0 Fetching thor 1.0.1 Installing thor 1.0.1 Fetching railties 5.0.7.2 Installing railties 5.0.7.2 Fetching coffee-rails 4.2.2 Installing coffee-rails 4.2.2 Fetching orm_adapter 0.5.0 Installing orm_adapter 0.5.0 Fetching responders 3.0.0 Installing responders 3.0.0 Fetching warden 1.2.8 Installing warden 1.2.8 Fetching devise 4.7.1 Installing devise 4.7.1 Fetching sassc 2.3.0 Installing sassc 2.3.0 with native extensions Fetching font-awesome-sass 5.4.1 Installing font-awesome-sass 5.4.1 Fetching temple 0.8.2 Installing temple 0.8.2 Fetching tilt 2.0.10 Installing tilt 2.0.10 Fetching haml 5.1.2 Installing haml 5.1.2 Fetching sexp_processor 4.14.1 Installing sexp_processor 4.14.1 Fetching ruby_parser 3.14.2 Installing ruby_parser 3.14.2 Fetching html2haml 2.2.0 Installing html2haml 2.2.0 Fetching haml-rails 1.0.0 Installing haml-rails 1.0.0 Fetching jbuilder 2.10.0 Installing jbuilder 2.10.0 Fetching jquery-rails 4.4.0 Installing jquery-rails 4.4.0 Fetching rb-fsevent 0.10.4 Installing rb-fsevent 0.10.4 Fetching rb-inotify 0.10.1 Installing rb-inotify 0.10.1 Fetching listen 3.0.8 Installing listen 3.0.8 Fetching mysql2 0.5.3 Installing mysql2 0.5.3 with native extensions Fetching pry 0.13.1 Installing pry 0.13.1 Fetching pry-rails 0.3.9 Installing pry-rails 0.3.9 Fetching puma 3.12.4 Installing puma 3.12.4 with native extensions Fetching sprockets 3.7.2 Installing sprockets 3.7.2 Fetching sprockets-rails 3.2.1 Installing sprockets-rails 3.2.1 Fetching rails 5.0.7.2 Installing rails 5.0.7.2 Fetching sass-listen 4.0.0 Installing sass-listen 4.0.0 Fetching sass 3.7.4 Installing sass 3.7.4 Fetching sass-rails 5.0.7 Installing sass-rails 5.0.7 Fetching spring 2.1.0 Installing spring 2.1.0 Fetching spring-watcher-listen 2.0.1 Installing spring-watcher-listen 2.0.1 Fetching uglifier 4.2.0 Installing uglifier 4.2.0 Fetching web-console 3.7.0 Installing web-console 3.7.0 Updating files in vendor/cache * rake-13.0.1.gem * concurrent-ruby-1.1.6.gem * i18n-1.8.2.gem * minitest-5.14.1.gem * thread_safe-0.3.6.gem * tzinfo-1.2.7.gem * activesupport-5.0.7.2.gem * builder-3.2.4.gem * erubis-2.7.0.gem * mini_portile2-2.4.0.gem * nokogiri-1.10.9.gem * rails-dom-testing-2.0.3.gem * crass-1.0.6.gem * loofah-2.5.0.gem * rails-html-sanitizer-1.3.0.gem * actionview-5.0.7.2.gem * rack-2.2.2.gem * rack-test-0.6.3.gem * actionpack-5.0.7.2.gem * nio4r-2.5.2.gem * websocket-extensions-0.1.4.gem * websocket-driver-0.6.5.gem * actioncable-5.0.7.2.gem * globalid-0.4.2.gem * activejob-5.0.7.2.gem * mini_mime-1.0.2.gem * mail-2.7.1.gem * actionmailer-5.0.7.2.gem * activemodel-5.0.7.2.gem * arel-7.1.4.gem * activerecord-5.0.7.2.gem * public_suffix-4.0.5.gem * addressable-2.7.0.gem * bcrypt-3.1.13.gem * bindex-0.8.1.gem * byebug-11.1.3.gem * mini_magick-4.10.1.gem * ffi-1.12.2.gem * ruby-vips-2.0.17.gem * image_processing-1.10.3.gem * mimemagic-0.3.5.gem * carrierwave-2.1.0.gem * coderay-1.1.2.gem * coffee-script-source-1.12.2.gem * execjs-2.7.0.gem * coffee-script-2.4.1.gem * method_source-1.0.0.gem * thor-1.0.1.gem * railties-5.0.7.2.gem * coffee-rails-4.2.2.gem * orm_adapter-0.5.0.gem * responders-3.0.0.gem * warden-1.2.8.gem * devise-4.7.1.gem * sassc-2.3.0.gem * font-awesome-sass-5.4.1.gem * temple-0.8.2.gem * tilt-2.0.10.gem * haml-5.1.2.gem * sexp_processor-4.14.1.gem * ruby_parser-3.14.2.gem * html2haml-2.2.0.gem * haml-rails-1.0.0.gem * jbuilder-2.10.0.gem * jquery-rails-4.4.0.gem * rb-fsevent-0.10.4.gem * rb-inotify-0.10.1.gem * listen-3.0.8.gem * mysql2-0.5.3.gem * pry-0.13.1.gem * pry-rails-0.3.9.gem * puma-3.12.4.gem * sprockets-3.7.2.gem * sprockets-rails-3.2.1.gem * rails-5.0.7.2.gem * sass-listen-4.0.0.gem * sass-3.7.4.gem * sass-rails-5.0.7.gem * spring-2.1.0.gem * spring-watcher-listen-2.0.1.gem * uglifier-4.2.0.gem * web-console-3.7.0.gem Bundle complete! 20 Gemfile dependencies, 83 gems now installed. Bundled gems are installed into `./vendor/cache` Post-install message from i18n: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. But that may break your application. If you are upgrading your Rails application from an older version of Rails: Please check your Rails app for 'config.i18n.fallbacks = true'. If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be 'config.i18n.fallbacks = [I18n.default_locale]'. If not, fallbacks will be broken in your app by I18n 1.1.x. If you are starting a NEW Rails application, you can ignore this notice. For more info see: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 Post-install message from sass: Ruby Sass has reached end-of-life and should no longer be used. * If you use Sass as a command-line tool, we recommend using Dart Sass, the new primary implementation: https://sass-lang.com/install * If you use Sass as a plug-in for a Ruby web framework, we recommend using the sassc gem: https://github.com/sass/sassc-ruby#readme * For more details, please refer to the Sass blog: https://sass-lang.com/blog/posts/7828841
経緯
個人で作成したアプリをherokuでデプロイしようとしたのですが、
rubyのバージョンを上げるようにエラーが出て、現在に至ります。
調べたこと
xargs
上記のコマンドを上手く使えば区切りながらコミットできるようなのですが、
使い方がわからず苦戦していました…
お手数をおかけしますが、教えていただけると幸いです。。
回答2件
あなたの回答
tips
プレビュー