I have a puppet pre-commit hook setup in git server, while pushing from local I get the following error:
remote: /usr/share/rubygems/rubygems/path_support.rb:68:in `path=': undefined method `+' for nil:NilClass (NoMethodError)
remote: from /usr/share/rubygems/rubygems/path_support.rb:30:in `initialize'
remote: from /usr/share/rubygems/rubygems.rb:357:in `new'
remote: from /usr/share/rubygems/rubygems.rb:357:in `paths'
remote: from /usr/share/rubygems/rubygems.rb:379:in `path'
remote: from /usr/share/rubygems/rubygems/specification.rb:794:in `dirs'
remote: from /usr/share/rubygems/rubygems/specification.rb:658:in `each_normal'
remote: from /usr/share/rubygems/rubygems/specification.rb:669:in `_all'
remote: from /usr/share/rubygems/rubygems/specification.rb:822:in `each'
remote: from /usr/share/rubygems/rubygems/specification.rb:864:in `find'
remote: from /usr/share/rubygems/rubygems/specification.rb:864:in `find_inactive_by_path'
remote: from /usr/share/rubygems/rubygems.rb:175:in `try_activate'
remote: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
remote: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:144:in `require'
remote: from <internal:abrt_prelude>:2:in `<compiled>'
pre-commit hook is normally a client-side hook, so it should not be installed on the server side, and should not be seen as "[remote] ...".
That being said, that same error was seen in this thread
The error comes from system ruby.
Have you installed the AIO package?
Maybe it is facter.
I just saw that the problem was that by downloading the release of yum.puppetlabs.com
I used the relational to Red Hat Enterprise.
Now downloading the correct release the same error did not happen
As seen in this answer, this can be also due to conflicting ruby versions.
But in any case, it is nit related to Git directly.
Related
I'm trying to start the prometheus_exporter gem with -b 0.0.0.0 parameter, in a docker container.
I get this error:
remote: /usr/local/lib/ruby/2.6.0/socket.rb:227:in `getaddrinfo': getaddrinfo: Name or service not known (SocketError)
remote: from /usr/local/lib/ruby/2.6.0/socket.rb:227:in `foreach'
remote: from /usr/local/lib/ruby/2.6.0/socket.rb:762:in `tcp_server_sockets'
remote: from /usr/local/lib/ruby/2.6.0/webrick/utils.rb:65:in `create_listeners'
remote: from /usr/local/lib/ruby/2.6.0/webrick/server.rb:127:in `listen'
remote: from /usr/local/lib/ruby/2.6.0/webrick/server.rb:108:in `initialize'
remote: from /usr/local/lib/ruby/2.6.0/webrick/httpserver.rb:47:in `initialize'
remote: from /usr/local/bundle/gems/prometheus_exporter-0.8.1/lib/prometheus_exporter/server/web_server.rb:47:in `new'
remote: from /usr/local/bundle/gems/prometheus_exporter-0.8.1/lib/prometheus_exporter/server/web_server.rb:47:in `initialize'
remote: from /usr/local/bundle/gems/prometheus_exporter-0.8.1/lib/prometheus_exporter/server/runner.rb:45:in `new'
remote: from /usr/local/bundle/gems/prometheus_exporter-0.8.1/lib/prometheus_exporter/server/runner.rb:45:in `start'
remote: from /usr/local/bundle/gems/prometheus_exporter-0.8.1/bin/prometheus_exporter:122:in `run'
remote: from /usr/local/bundle/gems/prometheus_exporter-0.8.1/bin/prometheus_exporter:126:in `<top (required)>'
remote: from /usr/local/bundle/bin/prometheus_exporter:23:in `load'
remote: from /usr/local/bundle/bin/prometheus_exporter:23:in `<main>'
remote: 2021-10-29 14:39:23 +0000 Starting prometheus exporter on 0.0.0.0:9394
The container is built using this Dockerfile:
FROM ruby:2.6.6
RUN gem install prometheus_exporter
WORKDIR /app
EXPOSE 9394
CMD ["-v","-b 0.0.0.0"]
ENTRYPOINT ["/usr/local/bundle/bin/prometheus_exporter"]
I need this to run in its own container to collect metrics from multiple other containers, so the 0.0.0.0 bind is necessary.
It starts if the -b 0.0.0.0 parameter is not used.
Any idea?
Getting error while trying to Deploy in heroku
remote: ------------------------------
remote: Bundle completed (48.81s)
remote: Cleaning up the bundler cache.
remote: -----> Installing node-v8.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: sh: 2: Syntax error: Unterminated quoted string
remote: sh: 2: Syntax error: Unterminated quoted string
remote: !
remote: ! Could not detect rake tasks
remote: ! ensure you can run `$ bundle exec rake -P` against your app
remote: ! and using the production group of your Gemfile.
remote: ! rake aborted!
remote: ! LoadError: Can't load WDM!
remote: !
remote: ! WDM is not supported on your system. For a cross-platform alternative,
remote: ! we recommend using Listen: http://github.com/guard/listen
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/wdm-0.1.1/lib/wdm.rb:4:in `rescue in <top (required)>'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/wdm-0.1.1/lib/wdm.rb:1:in `<top (required)>'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:82:in `require'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:77:in `each'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:77:in `block in require'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:66:in `each'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:66:in `require'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler.rb:108:in `require'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/config/application.rb:7:in `<top (required)>'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/Rakefile:4:in `require_relative'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/Rakefile:4:in `<top (required)>'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load_rakefile'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:703:in `raw_load_rakefile'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:104:in `block in load_rakefile'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:103:in `load_rakefile'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:82:in `block in run'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
remote: ! /tmp/build_23f08682e6a066ec3fbe1f3ee37ee97d/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
remote: ! vendor/bundle/bin/rake:17:in `load'
remote: ! vendor/bundle/bin/rake:17:in `<main>'
remote: !
remote: ! Caused by:
remote: ! LoadError: cannot load such file -- wdm_ext
From the description provided it seems like you have specified a wdm dependency since you were developing the application on windows but the same could not be found when deploying on heroku(unix system) .
Have you added the following in the Gemfile??
platforms :mswin do
gem "wdm"
end
If it is there in Gemfile then modify it to below mentioned:
platforms :mswin do
gem "wdm", :group => [:development]
end
Then add it to git and try deploying on heroku.
Trying to build a gem like so.
gem build my-awesome-theme.gemspec
And for some unknown reason it's throwing the following error.
/Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package/tar_writer.rb:249:in `write': closed stream (IOError)
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package/tar_writer.rb:249:in `close'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package/tar_writer.rb:87:in `ensure in new'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package/tar_writer.rb:87:in `new'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package.rb:231:in `block in build'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package.rb:230:in `open'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package.rb:230:in `build'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package.rb:111:in `build'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/commands/build_command.rb:48:in `execute'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/command.rb:305:in `invoke_with_build_args'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/command_manager.rb:167:in `process_args'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/command_manager.rb:137:in `run'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/gem_runner.rb:54:in `run'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/bin/gem:21:in `<main>'
Have tried complete rebuild of the ruby environment using RVM, and fresh clone of the gem source from GitHub but the problem persists.
Running Mac OSX, RVM and Ruby 2.3.1
Any help greatly received. :)
Thanks to some help on the #ruby-lang IRC channel I managed to track this issue to an outdated version of rubygems, bumped it from 2.2 to 2.6 and problem appears to have gone away.
im trying to install cocoapods in a project oy mine, but i get always an error
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface/error_report.rb:103: warning: Insecure world writable dir /usr/local in PATH, mode 040777
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `open': No such file or directory - /Users/CravenJM/.cocoapods/repos (Errno::ENOENT)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `foreach'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb:422:in `children'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:63:in `all'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface/error_report.rb:130:in `repo_information'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface/error_report.rb:34:in `report'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:58:in `report_error'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:300:in `handle_exception'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:274:in `rescue in run'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:264:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
any idea what it could be or how i could fix that? i need cocoapods for an app, but its a nightmare :-)
I had the same error on a new Mac because I forgot to run "pod setup" after installing cocoapods. Because of that the specs repo was missing and the "pod install" command failed.
I'm trying to deploy my Ruby on Rails app to Heroku with Unicorn. I followed the tutorial on Heroku website. But it shows:
Precompiling assets failed.
Here is the running result:
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
rake aborted!
uninitialized constant Rack::Timeout
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/config/initializers/timeout.rb:1:in `<top (required)>'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/engine.rb:649:in `block in load_config_initializer'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0.rc1/lib/active_support/notifications.rb:161:in `instrument'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/engine.rb:648:in `load_config_initializer'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/engine.rb:613:in `block (2 levels) in <class:Engine>'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/engine.rb:612:in `each'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/engine.rb:612:in `block in <class:Engine>'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/initializable.rb:30:in `run'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/initializable.rb:44:in `each'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/application.rb:286:in `initialize!'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/config/environment.rb:5:in `<top (required)>'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/application.rb:262:in `require_environment!'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/application.rb:346:in `block in run_tasks_blocks'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
Precompiling assets failed.
Push rejected, failed to compile Ruby app
I use Ruby2.0, Ruby on Rails 4.1.0.rc1.
It looks like your problem is actually related to Rack::Timeout and not asset compilation.
uninitialized constant Rack::Timeout
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/config/initializers/timeout.rb:1:in `<top (required)>'
Have you included the rack-timeout gem in your gemfile? And ran bundle install after that?
gem "rack-timeout"
Remove the timeout setting:
rm config/initializers/timeout.rb
Heroku times-out all requests at 30 seconds but the process will continue running in the background.
If you want to avoid that, re-add the line above but put rack-timeout in your Gemfile.
I would suggest trying the following:
heroku labs:enable user-env-compile
If this fails, you could always precompile your production assets, add them to your codebase and push them to heroku yourself.
RAILS_ENV=production rake assets:precompile
git add .
git commit -m 'serving up my precompiled assets'
git push origin master
git push origin heroku