assets:precompile throws error: undefined method `each' for true:TrueClass - css

I've just started maintaining someone else's code base and I'm having trouble getting it to run locally in a production environment. The error itself arises when precompiling the stylesheets.
It's a Rails 3.2.6 app running on Ruby 1.9.2. I noticed that in the output below, the gemset being used it global, which is odd because when I run
rvm gemset list
it indicates that the project's gemset is being used. I'm not sure if this is a cause of my problem of if it's unrelated.
I'm not really sure what to do to fix this. Any suggestions?
RAILS_ENV=production rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/bendowney/.rvm/rubies/ruby-1.9.2-p320/bin/ruby /Users/bendowney/.rvm/gems/ruby-1.9.2-p320#global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
undefined method `each' for true:TrueClass
/Users/bendowney/.rvm/gems/ruby-1.9.2-p320#challenge/gems/actionpack-3.2.6/lib/sprockets/static_compiler.rb:47:in `compile_path?'
/Users/bendowney/.rvm/gems/ruby-1.9.2-p320#challenge/gems/actionpack-3.2.6/lib/sprockets/static_compiler.rb:22:in `block in compile'
/Users/bendowney/.rvm/gems/ruby-1.9.2-p320#challenge/gems/sprockets-2.1.3/lib/sprockets/base.rb:212:in `block in each_logical_path'
/Users/bendowney/.rvm/gems/ruby-1.9.2-p320#challenge/gems/sprockets-2.1.3/lib/sprockets/base.rb:200:in `block (2 levels) in each_file'
/Users/bendowney/.rvm/gems/ruby-1.9.2-p320#challenge/gems/sprockets-2.1.3/lib/sprockets/base.rb:190:in `each'
/Users/bendowney/.rvm/gems/ruby-1.9.2-p320#challenge/gems/sprockets-2.1.3/lib/sprockets/base.rb:190:in `each_entry'
/Users/bendowney/.rvm/gems/ruby-1.9.2-p320#challenge/gems/sprockets-2.1.3/lib/sprockets/base.rb:198:in `block in each_file'
/Users/bendowney/.rvm/gems/ruby-1.9.2-p320#challenge/gems/sprockets-2.1.3/lib/sprockets/base.rb:197:in `each'
/Users/bendowney/.rvm/gems/ruby-1.9.2-p320#challenge/gems/sprockets-2.1.3/lib/sprockets/base.rb:197:in `each_file'
/Users/bendowney/.rvm/gems/ruby-1.9.2-p320#challenge/gems/sprockets-2.1.3/lib/sprockets/base.rb:210:in `each_logical_path'
/Users/bendowney/.rvm/gems/ruby-1.9.2-p320#challenge/gems/actionpack-3.2.6/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/bendowney/.rvm/gems/ruby-1.9.2-p320#challenge/gems/actionpack-3.2.6/lib/sprockets/assets.rake:56:in `internal_precompile'
/Users/bendowney/.rvm/gems/ruby-1.9.2-p320#challenge/gems/actionpack-3.2.6/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'

In your environments/production.rb make sure your config.assets.precompile is an Array and not set to true. Example from the docs:
config.assets.precompile += ['admin.js', 'admin.css', 'swfObject.js']

Related

rake assets:precompile of rails 7 application fails on amazon linux 2

I have migrated my Rails application from Rails 6 to 7 and I am successfully able to run it locally. But when I try to deploy this application on AWS - ElasticBeanstalk, it fails during /bin/su webapp -c bundle exec rake assets:precompile step.
Below are the deploy logs (/var/log/eb-engine.log) from Amazon Linux 2 EC2 instance:
[INFO] Starting...
[INFO] Starting EBPlatform-PlatformEngine
[INFO] reading event message file
[INFO] Engine received EB command cfn-hup-exec
[INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:XXXXX:stack/awseb-e-eid-stack/STACK_ID -r AWSEBAutoScalingGroup --region us-east-1
[INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:XXXXX:stack/awseb-e-eid-stack/STACK_ID -r AWSEBBeanstalkMetadata --region us-east-1
[INFO] checking whether command app-deploy is applicable to this instance...
[INFO] this command is applicable to the instance, thus instance should execute command
[INFO] Engine command: (app-deploy)
[INFO] Downloading EB Application...
[INFO] Region: us-east-1
[INFO] envID
[INFO] envBucket: elasticbeanstalk-us-east-1-XXXXX
[INFO] Using manifest file name from command request
[INFO] Manifest name is : manifest_xxxxx
[INFO] Download app version manifest
[INFO] Downloading: bucket: elasticbeanstalk-us-east-1-XXXXX, object: /resources/environments/e-eid/_runtime/versions/manifest_xxxxx
[INFO] Download successful168bytes downloaded
[INFO] Trying to read and parse version manifest...
[INFO] Downloading: bucket: elasticbeanstalk-us-east-1-XXXXX, object: /resources/environments/e-eid/_runtime/_versions/appName/code-pipeline-ID
[INFO] Download successful28982425bytes downloaded
[INFO] Executing instruction: ElectLeader
[INFO] Running leader election for instance i-0d356...
[INFO] Calling the cfn-elect-cmd-leader to elect the command leader.
[INFO] Running command /bin/sh -c /opt/aws/bin/cfn-elect-cmd-leader --stack arn:aws:cloudformation:us-east-1:XXXXX:stack/awseb-e-eid-stack/STACK_ID --command-name ElasticBeanstalkCommand-AWSEBAutoScalingGroup --invocation-id ID --listener-id i-0d356 --region us-east-1
[INFO] Instance is Leader.
[INFO] Executing instruction: stopSqsd
[INFO] This is a web server environment instance, skip stop sqsd daemon ...
[INFO] Executing instruction: PreBuildEbExtension
[INFO] Starting executing the config set Infra-EmbeddedPreBuild.
[INFO] Running command /bin/sh -c /opt/aws/bin/cfn-init -s arn:aws:cloudformation:us-east-1:XXXXX:stack/awseb-e-eid-stack/STACK_ID -r AWSEBAutoScalingGroup --region us-east-1 --configsets Infra-EmbeddedPreBuild
[INFO] Finished executing the config set Infra-EmbeddedPreBuild.
[INFO] Executing instruction: StageApplication
[INFO] extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/
[INFO] Running command /bin/sh -c /usr/bin/unzip -q -o /opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/staging/
[INFO] finished extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
[INFO] Executing instruction: RunAppDeployPreBuildHooks
[INFO] Executing platform hooks in .platform/hooks/prebuild/
[INFO] Following scripts will be executed in order: [01_install_packages.sh 02_prepare_bundle_local.sh 03_ebenv.sh 04_install_wkhtmltopdf_kit.sh]
[INFO] Running script: .platform/hooks/prebuild/01_install_packages.sh
[INFO] Running script: .platform/hooks/prebuild/02_prepare_bundle_local.sh
[INFO] Running script: .platform/hooks/prebuild/03_ebenv.sh
[INFO] Running script: .platform/hooks/prebuild/04_install_wkhtmltopdf_kit.sh
[INFO] Finished running scripts in /var/app/staging/.platform/hooks/prebuild
[INFO] Executing instruction: stage ruby application
[INFO] stage ruby application ....
[INFO] Running command /bin/sh -c rbenv global
[INFO] 2.7.5
[INFO] Running command /bin/sh -c bundle --version
[INFO] Bundler version 2.3.10
[INFO] Running command /bin/sh -c bundle config set --local deployment true
[INFO] Running command /bin/sh -c bundle _2.3.10_ install --local
[INFO] Installing rake 13.0.6
Installing concurrent-ruby 1.1.10
Installing minitest 5.15.0
Installing builder 3.2.4
Installing erubi 1.10.0
Installing mini_portile2 2.8.0
Installing racc 1.6.0 with native extensions
Installing crass 1.0.6
Installing rack 2.2.3
Installing nio4r 2.5.8 with native extensions
Installing websocket-extensions 0.1.5
Installing marcel 1.0.2
Installing mini_mime 1.1.2
Installing aws-eventstream 1.2.0
Installing aws-partitions 1.587.0
Installing jmespath 1.6.1
Using bundler 2.3.10
Installing method_source 1.0.0
Installing thor 1.2.1
Installing zeitwerk 2.5.4
Installing jsonapi-renderer 0.2.2
Installing public_suffix 4.0.7
Installing amazon_pay 2.6.1
Installing execjs 2.8.1
Installing faraday-em_http 1.0.0
Installing faraday-em_synchrony 1.0.0
Installing faraday-excon 1.1.0
Installing faraday-httpclient 1.0.1
Installing multipart-post 2.1.1
Installing faraday-net_http 1.0.1
Installing faraday-net_http_persistent 1.2.0
Installing faraday-patron 1.0.0
Installing faraday-rack 1.0.0
Installing faraday-retry 1.0.3
Installing ruby2_keywords 0.0.5
Installing multi_json 1.15.0
Installing bcrypt 3.1.18 with native extensions
Installing msgpack 1.5.1 with native extensions
Installing bootstrap-filestyle-rails 1.2.1
Installing ffi 1.15.5 with native extensions
Installing rexml 3.2.5
Installing browser 5.3.1
Installing climate_control 0.2.0
Installing coderay 1.1.3
Installing coffee-script-source 1.12.2
Installing country-select 1.2.1
Installing dalli 3.2.1
Installing declarative 0.0.20
Installing orm_adapter 0.5.0
Installing hashie 5.0.0
Installing elasticsearch-rails 7.2.1
Installing excon 0.92.3
Installing flutie 2.2.0
Installing formatador 1.1.0
Installing mime-types-data 3.2022.0105
Installing foundation_emails 2.2.1.0
Installing geocoder 1.8.0
Installing jwt 2.3.0
Installing memoist 0.16.2
Installing os 1.0.1
Installing httpclient 2.8.3
Installing trailblazer-option 0.1.2
Installing uber 0.1.0
Installing retriable 3.1.2
Installing webrick 1.7.0
Installing sexp_processor 4.16.1
Installing temple 0.8.2
Installing tilt 2.0.10
Installing honeybadger 4.12.1
Installing htmlentities 4.3.4
Installing jquery-datetimepicker-rails 2.4.1.0
Installing rb-fsevent 0.11.1
Installing json 2.6.2 with native extensions
Installing kaminari-core 1.2.2
Installing memcachier 0.0.2
Installing newrelic_rpm 8.7.0
Installing pg 1.3.5 with native extensions
Installing puma 3.12.6 with native extensions
Installing rails_serve_static_assets 0.0.5
Installing rails_stdout_logging 0.0.5
Installing rdoc 6.3.3
Installing ruby-ole 1.2.12.2
Installing rubyzip 2.3.2
Installing slack-notifier 2.4.0
Installing turbolinks-source 5.2.0
Installing wkhtmltopdf-binary 0.12.6
Installing sitemap_generator 6.2.1
Installing i18n 1.10.0
Installing tzinfo 2.0.4
Installing rack-test 1.1.0
Installing warden 1.2.9
Installing font_assets 0.1.14
Installing rack-cors 1.1.1
Installing rack-maintenance 2.1.0
Installing sprockets 3.7.2
Installing nokogiri 1.13.6 with native extensions
Installing websocket-driver 0.7.5 with native extensions
Installing mail 2.7.1
Installing aws-sigv4 1.5.0
Installing addressable 2.8.0
Installing autoprefixer-rails 10.4.7.0
Installing uglifier 4.2.0
Installing faraday-multipart 1.0.3
Installing elasticsearch-api 7.17.1
Installing bootsnap 1.4.9 with native extensions
Installing braintree 4.7.0
Installing terrapin 0.6.0
Installing pry 0.14.1
Installing coffee-script 2.4.1
Installing mime-types 3.4.1
Installing representable 3.2.0
Installing ruby_parser 3.19.1
Installing haml 5.2.2
Installing recaptcha 5.10.0
Installing sendgrid 1.2.4
Installing rails_12factor 0.0.3
Installing sdoc 1.1.0
Installing spreadsheet 1.3.0
Installing turbolinks 5.2.1
Installing sassc 2.1.0 with native extensions
Installing get_process_mem 0.2.7
Installing rb-inotify 0.10.1
Installing activesupport 7.0.0
Installing aws-sdk-core 3.131.0
Installing css_parser 1.11.0
Installing faraday 1.10.0
Installing pry-rails 0.3.9
Installing fog-core 2.3.0
Installing ruby2ruby 2.4.4
Installing loofah 2.18.0
Installing inky-rb 1.4.2.0
Installing mimemagic 0.3.10 with native extensions
Installing puma_worker_killer 0.3.1
Installing sass-listen 4.0.0
Installing rails-dom-testing 2.0.3
Installing globalid 1.0.0
Installing activemodel 7.0.0
Installing case_transform 0.2
Installing rack-tracker 1.13.0
Installing view_component 2.55.0
Installing wicked_pdf 2.6.2
Installing aws-sdk-sqs 1.51.1
Installing aws-sdk-kms 1.57.0
Installing premailer 1.16.0
Installing faraday_middleware 1.2.0
Installing elasticsearch-transport 7.17.1
Installing signet 0.16.1
Installing twilio-ruby 5.67.0
Installing fog-json 1.2.0
Installing fog-xml 0.1.4
Installing rails-html-sanitizer 1.4.2
Installing sass 3.7.4
Installing activejob 7.0.0
Installing activerecord 7.0.0
Installing paperclip 6.0.0
Installing aws-sdk-s3 1.114.0
Installing avatax 22.3.0
Installing elasticsearch 7.17.1
Installing googleauth 1.1.3
Installing fog-aws 3.14.0
Installing actionview 7.0.0
Installing audited 5.0.2
Installing friendly_id 5.4.2
Installing hairtrigger 0.2.25
Installing kaminari-activerecord 1.2.2
Installing pg_search 2.3.6
Installing pghero 2.8.3
Installing paperclip-compression 2.0.0
Installing elasticsearch-model 7.2.1
Installing google-apis-core 0.5.0
Installing actionpack 7.0.0
Installing jbuilder 2.11.5
Installing kaminari-actionview 1.2.2
Installing elasticsearch-persistence 7.2.1
Installing google-apis-analyticsreporting_v4 0.7.0
Installing actioncable 7.0.0
Installing activestorage 7.0.0
Installing actionmailer 7.0.0
Installing actionpack-action_caching 1.2.2
Installing railties 7.0.0
Installing active_model_serializers 0.10.13
Installing apipie-rails 0.7.2
Installing sprockets-rails 3.4.2
Installing simple_form 5.1.0
Installing kaminari 1.2.2
Installing actionmailbox 7.0.0
Installing actiontext 7.0.0
Installing premailer-rails 1.11.1
Installing coffee-rails 5.0.0
Installing responders 3.0.1
Installing jquery-rails 4.4.0
Installing jquery-fileupload-rails 0.4.7
Installing jquery-ui-rails 5.0.3
Installing masonry-rails 0.2.4
Installing rails-healthcheck 1.4.0
Installing sass-rails 5.1.0
Installing rails 7.0.0
Installing devise 4.8.1
Installing jhtmlarea 0.1.0
Installing active_elastic_job 3.2.0
Installing chartjs-ror 3.7.0
Installing dropzonejs-rails 0.8.5
Installing gridhook 0.2.0
Using s3_direct_upload 0.1.7 from https://github.com/waynehoover/s3_direct_upload.git (at /var/app/staging/vendor/cache/s3_direct_upload-6f6decc75fdf#6f6decc)
Installing bootstrap-sass 3.4.1
Bundle complete! 94 Gemfile dependencies, 205 gems now installed.
Gems in the groups 'test' and 'development' were not installed.
Bundled gems are installed into `./vendor/bundle`
[INFO] Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
[INFO] Running command /bin/sh -c rbenv rehash
[INFO] encountered a Gemfile.lock, setting proper permissions to user webapp
[INFO] Executing instruction: check default web server
[INFO] Executing instruction: check procfile
[INFO] detected Procfile in application source bundle ...
[INFO] Executing instruction: configure X-Ray
[INFO] X-Ray is not enabled.
[INFO] Executing instruction: Configure proxy Nginx
[INFO] configuring proxy...
[INFO] Copying file nginx/webapp.conf to /nginx/conf.d/elasticbeanstalk/webapp.conf
[INFO] Copying file /opt/elasticbeanstalk/config/private/nginx/elasticbeanstalk-nginx-ruby-upstream.conf to /var/proxy/staging/nginx/conf.d/elasticbeanstalk-nginx-ruby-upstream.conf
[INFO] Running command /bin/sh -c cp -rp /var/app/staging/.platform/nginx/. /var/proxy/staging/nginx
[INFO] Executing instruction: configure healthd specific proxy conf
[INFO] Running command /bin/sh -c systemctl show -p PartOf healthd.service
[WARN] Warning: process healthd is already registered...
Deregistering the process ...
[INFO] Running command /bin/sh -c systemctl show -p PartOf healthd.service
[INFO] Running command /bin/sh -c systemctl is-active healthd.service
[INFO] Running command /bin/sh -c systemctl show -p PartOf healthd.service
[INFO] Running command /bin/sh -c systemctl stop healthd.service
[INFO] Running command /bin/sh -c systemctl disable healthd.service
[INFO] Removed symlink /etc/systemd/system/multi-user.target.wants/healthd.service.
[INFO] Running command /bin/sh -c systemctl daemon-reload
[INFO] Running command /bin/sh -c systemctl reset-failed
[INFO] Running command /bin/sh -c systemctl daemon-reload
[INFO] Running command /bin/sh -c systemctl reset-failed
[INFO] Running command /bin/sh -c systemctl is-enabled aws-eb.target
[INFO] Running command /bin/sh -c systemctl enable aws-eb.target
[INFO] Running command /bin/sh -c systemctl start aws-eb.target
[INFO] Running command /bin/sh -c systemctl enable healthd.service
[INFO] Created symlink from /etc/systemd/system/multi-user.target.wants/healthd.service to /etc/systemd/system/healthd.service.
[INFO] Running command /bin/sh -c systemctl show -p PartOf healthd.service
[INFO] Running command /bin/sh -c systemctl is-active healthd.service
[INFO] Running command /bin/sh -c systemctl start healthd.service
[INFO] Copying file /opt/elasticbeanstalk/config/private/healthd/healthd_logformat.conf to /var/proxy/staging/nginx/conf.d/healthd_logformat.conf
[INFO] Copying file /opt/elasticbeanstalk/config/private/healthd/healthd_nginx.conf to /var/proxy/staging/nginx/conf.d/elasticbeanstalk/healthd.conf
[INFO] Executing instruction: rake tasks
[INFO] Running command /bin/sh -c npm bin --global
[INFO] /opt/elasticbeanstalk/support/node-install/node-v16.14.2-linux-x64/bin
[INFO] (not in PATH env variable)
[INFO] Running command /bin/sh -c rbenv global
[INFO] 2.7.5
[INFO] Running command /bin/su webapp -c bundle exec /opt/elasticbeanstalk/config/private/checkforraketask.rb assets:precompile
[INFO] Found assets:precompile task in Rakefile
[INFO] Running command /bin/su webapp -c bundle exec rake assets:precompile
[INFO] You don't have dalli installed in your application. Please add it to your Gemfile and run bundle install
rake aborted!
LoadError: cannot load such file -- connection_pool
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/dalli-3.2.1/lib/rack/session/dalli.rb:5:in `<main>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/session/mem_cache_store.rb:5:in `<main>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/configuration.rb:381:in `const_get'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/configuration.rb:381:in `session_store'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/default_middleware_stack.rb:66:in `block in build_stack'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/stack.rb:72:in `initialize'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/default_middleware_stack.rb:15:in `new'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/default_middleware_stack.rb:15:in `build_stack'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:568:in `default_middleware_stack'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/engine.rb:514:in `block in app'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/engine.rb:512:in `synchronize'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/engine.rb:512:in `app'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/finisher.rb:57:in `block in <module:Finisher>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:32:in `instance_exec'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:32:in `run'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:60:in `run_initializers'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:369:in `initialize!'
/var/app/staging/config/environment.rb:5:in `<main>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:345:in `require_environment!'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:507:in `block in run_tasks_blocks'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/task.rb:61:in `block (2 levels) in define'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/elasticbeanstalk/.rbenv/versions/2.7.5/bin/bundle:25:in `load'
/opt/elasticbeanstalk/.rbenv/versions/2.7.5/bin/bundle:25:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)
[ERROR] An error occurred during execution of command [app-deploy] - [rake tasks]. Stop running the command. Error: running rake task assets:precompile failed with error command bundle exec rake assets:precompile failed with error Command /bin/su webapp -c bundle exec rake assets:precompile failed with error exit status 1. Stderr:You don't have dalli installed in your application. Please add it to your Gemfile and run bundle install
rake aborted!
LoadError: cannot load such file -- connection_pool
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/dalli-3.2.1/lib/rack/session/dalli.rb:5:in `<main>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/session/mem_cache_store.rb:5:in `<main>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/configuration.rb:381:in `const_get'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/configuration.rb:381:in `session_store'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/default_middleware_stack.rb:66:in `block in build_stack'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/actionpack-7.0.0/lib/action_dispatch/middleware/stack.rb:72:in `initialize'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/default_middleware_stack.rb:15:in `new'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/default_middleware_stack.rb:15:in `build_stack'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:568:in `default_middleware_stack'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/engine.rb:514:in `block in app'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/engine.rb:512:in `synchronize'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/engine.rb:512:in `app'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application/finisher.rb:57:in `block in <module:Finisher>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:32:in `instance_exec'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:32:in `run'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/initializable.rb:60:in `run_initializers'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:369:in `initialize!'
/var/app/staging/config/environment.rb:5:in `<main>'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:345:in `require_environment!'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/railties-7.0.0/lib/rails/application.rb:507:in `block in run_tasks_blocks'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/task.rb:61:in `block (2 levels) in define'
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/elasticbeanstalk/.rbenv/versions/2.7.5/bin/bundle:25:in `load'
/opt/elasticbeanstalk/.rbenv/versions/2.7.5/bin/bundle:25:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)
[INFO] Executing cleanup logic
[INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1653470206490,"severity":"ERROR"}]}]}
[INFO] Platform Engine finished execution on command: app-deploy
Dalli from version 3.0.0 and above has dependency on connection_pool gem and interestingly this gem was not downloaded during bundle install. Downgrading dalli to 2.7.11 resolved this for me.

why flutter has stopped to launch my app on ios

All of a sudden I cant run my flutter app that uses firebase.
Apparently there's a problem with the pod install process, some dependency incompatibility.
Given the fact that I haven't changed anything in the yaml file and the app worked perfectly this morning, I assume is some problem with the tools and not with my source code.
The problem appeared after a flutter plugin update, but I don't know if the two things are related.
This is the build output:
Launching lib/main.dart on iPhone XR in debug mode...
Running pod install...
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
-> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
-> Fetching podspec for `google_sign_in` from `.symlinks/plugins/google_sign_in/ios`
Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "Firebase/Auth":
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on
Firebase/Auth
firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 0.0.1, which depends on
Firebase/Auth (~> 5.19)
Specs satisfying the `Firebase/Auth, Firebase/Auth (~> 5.19)` dependency were found, but they required a higher minimum deployment target.
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:257:in `process_topmost_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/resolver.rb:91:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:909:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:907:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:114:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:266:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:174:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:173:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:136:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command/install.rb:48:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'
Error output from CocoaPods:
↳
[!] Automatically assigning platform `ios` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
Error launching application on iPhone XR.

16.04 therubyracer/v8 loaderror v8.so 4

I am using Rails 4.2.5, ruby 2.2.5, v8 and the rubyracer gem tried all kids of versions from on-line helps nothing works. . I keep getting the errors below. V8 is not able to initialize. I tried different versions of rails and ruby using rvm. Bundle installs and bundle updates have no errors at all. Then when I 'rake' I get the following errors 'not happening' on Ubuntu 14.04.
rake
rake aborted!
LoadError: incompatible library version - /home/wayne/.rvm/gems/ruby- 2.2.5/gems/therubyracer-0.12.2/lib/v8/init.so
/home/wayne/.rvm/gems/ruby-2.2.5/gems/therubyracer-0.12.2/lib/v8.rb:4:in `require'
/home/wayne/.rvm/gems/ruby-2.2.5/gems/therubyracer-0.12.2/lib/v8.rb:4:in `<top (required)>'
/home/wayne/.rvm/gems/ruby-2.2.5/gems/therubyracer-0.12.2 /lib/therubyracer.rb:1:in `require'
/home/wayne/.rvm/gems/ruby-2.2.5/gems/therubyracer-0.12.2 /lib/therubyracer.rb:1:in `<top (required)>'

Broken Gems while Upgrading

I tried updating one of my gems and ran into a whole lot of issues. I installed RVM (osx) thinking it would cure some issues - it didnt.
When running my grunt command i get this as my output:
Warning: Running "jekyll:server" (jekyll) task
`bundle exec jekyll build --source app --destination .jekyll --config _config.yml` was initiated.
Jekyll output:
Warning: Command failed: /Users/Amit/.rvm/gems/ruby-2.2.0/gems/commander-4.1.6/lib/commander/runner.rb:385:in `block in require_program': program version required (Commander::Runner::CommandError)
from /Users/Amit/.rvm/gems/ruby-2.2.0/gems/commander-4.1.6/lib/commander/runner.rb:384:in `each'
from /Users/Amit/.rvm/gems/ruby-2.2.0/gems/commander-4.1.6/lib/commander/runner.rb:384:in `require_program'
from /Users/Amit/.rvm/gems/ruby-2.2.0/gems/commander-4.1.6/lib/commander/runner.rb:52:in `run!'
from /Users/Amit/.rvm/gems/ruby-2.2.0/gems/commander-4.1.6/lib/commander/delegates.rb:8:in `run!'
from /Users/Amit/.rvm/gems/ruby-2.2.0/gems/commander-4.1.6/lib/commander/import.rb:10:in `block in <top (required)>'
/Users/Amit/.rvm/gems/ruby-2.2.0/gems/safe_yaml-0.9.7/lib/safe_yaml/syck_node_monkeypatch.rb:42:in `<top (required)>': uninitialized constant Syck (NameError)
from /Users/Amit/.rvm/gems/ruby-2.2.0/gems/safe_yaml-0.9.7/lib/safe_yaml.rb:200:in `require'
from /Users/Amit/.rvm/gems/ruby-2.2.0/gems/safe_yaml-0.9.7/lib/safe_yaml.rb:200:in `<module:YAML>'
from /Users/Amit/.rvm/gems/ruby-2.2.0/gems/safe_yaml-0.9.7/lib/safe_yaml.rb:132:in `<top (required)>'
from /Users/Amit/.rvm/gems/ruby-2.2.0/gems/jekyll-1.3.1/lib/jekyll.rb:21:in `require'
from /Users/Amit/.rvm/gems/ruby-2.2.0/gems/jekyll-1.3.1/lib/jekyll.rb:21:in `<top (required)>'
from /Users/Amit/.rvm/gems/ruby-2.2.0/gems/jekyll-1.3.1/bin/jekyll:7:in `require'
from /Users/Amit/.rvm/gems/ruby-2.2.0/gems/jekyll-1.3.1/bin/jekyll:7:in `<top (required)>'
from /Users/Amit/.rvm/gems/ruby-2.2.0/bin/jekyll:23:in `load'
from /Users/Amit/.rvm/gems/ruby-2.2.0/bin/jekyll:23:in `<main>'
from /Users/Amit/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
from /Users/Amit/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
Use --force to continue.
Can someone help me fix/resolve this? Should i start over again? My build was generated prior to installing RVM.
I ran 'rvm reset and 'rvm version and it seems to have fixed my problem. Not too sure what was going on - I believe the ruby versions were confused.

rails server not starting- undefined method `formatter' for nil:NilClass (NoMethodError) error

I am using rails 4.1, but when i try to run 'rails s' on the terminal it give this error:
Exiting
/home/ben/.rvm/gems/ruby-2.0.0-p247#addtocartalerts/gems/railties-4.0.4/lib/rails/commands/server.rb:78:in `start': undefined method `formatter' for nil:NilClass (NoMethodError)
from /home/ben/.rvm/gems/ruby-2.0.0-p247#addtocartalerts/gems/railties-4.0.4/lib/rails/commands.rb:76:in `block in <top (required)>'
from /home/ben/.rvm/gems/ruby-2.0.0-p247#addtocartalerts/gems/railties-4.0.4/lib/rails/commands.rb:71:in `tap'
from /home/ben/.rvm/gems/ruby-2.0.0-p247#addtocartalerts/gems/railties-4.0.4/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
please help
You are not using rails 4.1. Look at the railties gem path. It says railties 4.0.4
Check Gemfile for right version. Do bundle update rails. Then use binstubs or bundle exec rails s if you have multiple rails gems installed

Resources