I uninstalled homebrew once when trying to fix an error but now when I try to re-install it, I keep getting error: Not a valid ref: refs/remotes/origin/deadline.
I looked at several solutions online and I realized this is happening because, for some reason, Homebrew is actually installing from a different repo that I have on my mac instead of from the Homebrew repo.
Any ideas on how to fix this? Thanks.
Solved it with help from the Homebrew's discussion page here. The solution was to unset the remote.origin.url in my global git config.
Related
After upgrading to Big Sur I am getting errors running my Ruby server rotating through different files either with
cannot load such file --
or
Interrupted system call --
These errors rotate various files each time I run bundle exec rackup. I have tried uninstalling/reinstalling RVM, XCode Command Line Tools, and even tried switching to rbenv. Same outcome.
Any ideas?
It seems to get solved by uninstalling Kaspersky.
Also, it seems that the ruby applications are not the only ones facing this issue.
There are other security solutions too, eg. Avira.
https://github.com/rbenv/ruby-build/issues/1710
https://github.com/dart-lang/sdk/issues/44509
I was able to solve this problem for an rbenv ruby installation after noticing a similar-ish issue listed at the end of the ruby-build wiki. Adding MAKE_OPTS=-j1 finally worked, though it took much longer; The whole build ran with one process. The final command I used (though I don't know if calling ruby-build directly was necessary):
MAKE_OPTS=-j1 RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl) --with-readline-dir=$(brew --prefix readline) --with-libyaml-dir=$(brew --prefix libyaml)" \
ruby-build --verbose 2.6.6 ~/.rbenv/versions/2.6.6/
# to hook it up with rbenv:
rbenv rehash
I know this isn't your exact problem, but perhaps re-installing ruby would help.
Not a complete resolution yet, but we did find out that the issue seems specific to the newrelic-ruby-agent and have opened an issue (https://github.com/newrelic/newrelic-ruby-agent/issues/528) with them to do further investigation.
As a workaround, we are able to run locally by setting NEW_RELIC_AGENT_ENABLED=false in the env.list
Uninstalling Avira solved the problem I was having with rbenv install 3.0.0 on macOS 11.2. (See ruby-build #1710 (comment).) Thanks to #alex for the tip.
I got this error in brew install lima
this may not look like answer, but running up that command again and again brew install lima I kept getting different errors, I ran that command 7-8 times, and was able to finally install lima.
I have spent many hours trying to understand the implications of local installation vs global (root?) installation, but couldn't grasp enough to even formulate a question. This issue (below) with Heroku is a part of that puzzle.
Heroku had been installed-and worked with some simple rails apps. But out of the blue, I began to get an error message that I should install Heroku CLI. Thinking perhaps I had messed things up, I went ahead and used Brew to install Heroku this time (brew install heroku/brew/heroku) Though the installation was successful, I continued to get the same error message about installing Heroku CLI.
Today, I started another rails app (rails new MyApp, got the same error message Install the Heroku CLI from https://cli.heroku.com, tried brew install heroku/brew/heroku yet again, and here's a new message:
Warning: heroku/brew/heroku 7.7.8 is already installed, it's just not linked
You can use `brew link heroku` to link this version.
When I did brew link heroku , I got this:
Linking /usr/local/Cellar/heroku/7.7.8...
Error: Could not symlink bin/heroku
Target /usr/local/bin/heroku
already exists. You may want to remove it:
rm '/usr/local/bin/heroku'
To force the link and overwrite all conflicting files:
brew link --overwrite heroku
To list all files that would be deleted:
brew link --overwrite --dry-run heroku
and brew link --overwrite --dry-run heroku led to:
Would remove:
/usr/local/bin/heroku -> /usr/local/lib/heroku/bin/heroku
Am I correct to assume that I am dealing with conflicting installations?
How do I resolve the current Heroku issue--let it remove duplicate files? What does that mean? (And which gets removed: /usr/local/bin/heroku or /usr/local/lib/heroku/bin/heroku ?
I believe I have similar issues related to ruby gem installations. I'd appreciate some pointers on understanding the fundamental issue of global vs local (vs individual app installations?), specifically related to ruby, rails and ruby gems.
I'm trying to get a Ruby on Rails project running on my Mac OS Sierra (10.13.3) machine. When I navigate to the Rails folder, RVM tells me the following:
Required ruby-1.9.3-p392 is not installed.
To install do: 'rvm install "ruby-1.9.3-p392"'
However, when I do that install, I get the following:
$ rvm install "ruby-1.9.3-p392"
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.13/x86_64/ruby-1.9.3-p392.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system..........
Installing required custom packages: homebrew/versions.
Error running 'requirements_osx_brew_install_custom homebrew/versions',
please read /Users/petercormack/.rvm/log/1518211184_ruby-1.9.3-p392/install_custom.log
Requirements installation failed with status: 1.
When I look at that log file, I see the following:
[2018-02-09 12:36:30] requirements_osx_brew_install_custom
requirements_osx_brew_install_custom ()
{
\typeset __tap;
for __tap in "$#";
do
brew tap "${__tap}" || return $?;
done
}
current path: /Users/petercormack/podcastsi18n
PATH=/usr/local/opt/qt#5.5/bin:/Users/petercormack/.node/bin:/usr/local/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/petercormack/.rvm/bin:/usr/local/Cellar/openssl/1.0.2j/bin/openssl
command(2): requirements_osx_brew_install_custom homebrew/versions
+ typeset __tap
+ for __tap in '"$#"'
+ brew tap homebrew/versions
Error: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.
+ return 1
So. RVM seems to be stuck on this idea of installing homebrew/versions, which has been completely removed by Homebrew. I've updated Homebrew. I've updated RVM. I've tried to trick Homebrew into having that tap available (not successful). I've tried to trick RVM into thinking that's not a required custom package (couldn't figure out how). Nothing seems to be working. Help!
EDIT
I got around the problem by actually upgrading the project to use ruby-2.1.0 . Worked like a charm, but of course didn't actually resolve the original issue. Thank you for the answers below, and hopefully they'll help out some other poor soul in the same situation!
I tripped up on this as well. While it's not a final answer with the help of a kind soul on Github I was able to find a temporary solution to this issue.
If you are running macOS 10.10 or later then you should run brew install gcc49. This will help RVM as it now won't try to tap the deprecated homebrew versions repository. If you are on an earlier version have a look at this function in RVM for the appropriate version of gcc to install.
I have documented the issue I was encountering over here:
https://github.com/rvm/rvm/issues/4303
Had the same problem. This happens only when installing a ruby version older than 2.0. I was able to get past this using rvm autolibs read-only then install the ruby again. This will tell rvm to use existing dependencies and to skip the error if something is missing. Just then try to manually install all the required packages using Brew.
https://rvm.io/rvm/autolibs
I had the same problem when I tried to install Ruby 3.0 . For me just updating RVM to the latest version fixed the issue:
rvm get stable
I am setting up a Rails Project. Each time I go to start the server, I am getting a big error;
rails server puma
warning: ignoring extraneous `ruby-' prefix in version `ruby-2.0.0-p247'
(set by /Users/jamesnewman/shout_factory/.ruby-version)
/Users/jamesnewman/shout_factory/vendor/bundle/gems/pg-0.15.1/lib/pg.rb:4:in `require': dlopen(/Users/jamesnewman/shout_factory/vendor/bundle/gems/pg-0.15.1/lib/pg_ext.bundle, 9): Library not loaded: /Users/jamesnewman/.rvm/rubies/ruby-2.0.0-p247/lib/libruby.2.0.0.dylib (LoadError)
Referenced from: /Users/jamesnewman/shout_factory/vendor/bundle/gems/pg-0.15.1/lib/pg_ext.bundle
Reason: image not found - /Users/jamesnewman/shout_factory/vendor/bundle/gems/pg-0.15.1/lib/pg_ext.bundle
To try and fix this, I have done;
Removed rvm for rbenv
Uninstalled and Re-Installed PG (with both Home Brew, and on the Gem Level)
Updated to ruby-2.0.0-p247 (as per the request of another dependency)
And many more attempts to fix that I have probably forgotten about. I have googled and tried almost every fix for something like this from different terminal commands, to full on switching from rvm to rbenv.
And just so I knew that it was this project that I was having a hard time with, and not something else, I started the server on a couple of my other projects and everything worked fine.
If anyone has any help on how to fix this, I would really appreciate it. If anyone needs to see maybe the gems I'm using or something else, I'd be more than happy to post it.
Note: This issue was able to be resolved. If anyone else has this issue, it can be fixed. It might be different, but for me, I was able to fix it by uninstalling all of the gems and reinstalling and setting up the entire project/system again from scratch. It was something wrong that I did, but it was able to be fixed.
Hope this helps anyone who may have a similar problem.
I just ran into this issue after downgrading PG from 14 to 13 due to port change. The solution that worked for me was to uninstall pg gem, then reinstall again.
I really need help with Rubygems (that's the package manager for ruby). Since I'm behind a proxy, I've given up all hope of it working automatically, so I had to download a lot of packages manually and install them for rails to install. Now, I'm getting an error message:
Rails requires RubyGems >= 1.3.2 (...)
Once again, I manually downloaded rubygems-1.3.2.gem and installed it, however, it still doesn't work and gem -v shows 1.3.1. Help. Also, I can assure it that unless gem has HTTP1.1 Auth Proxy support, there is no way it by itself will be able to contact its server...
Before running rubygems commands, you should try something like (for windows)
set http_proxy=user:password#ip:port
Or export for linux, I guess.
It seems that one can simply download the source tarballs, untar them and use setup.rb to install the update. More information on it here.
I did this and was very pleased with the result (no problem!).