gem install heroku failed with following message and I have tried the solution here, but it failed also. Is there any other way I can install Heroku?
WARNING: RubyGems 1.2+ index not found for: http://gems.rubyforge.org/
RubyGems will revert to legacy indexes degrading performance.
ERROR: could not find gem heroku locally or in a repository.
Heroku now offers a standalone client, called the Heroku Toolbelt. Check out https://toolbelt.heroku.com/ for current installation instructions.
you should be able to bypass the problem by downloading the heroku gem from rubygems.org and install from the local copy.
go to http://rubygems.org/gems/heroku and click the download link to download version 1.8.5
then move into the download folder and do a gem install --local heroku-1.8.5.gem ,but follow the instruction to install the dependency first
Updating the gem to version 1.3.6 seem solve the problem.
However, gem update --system does not work on Ubuntu platforms, and apt-get install rubygems1.8 always bring you to version 1.2.0.
Here is the trick to update your gems to latest one,1.3.6, by the time of writing:
sudo gem install rubygems-update
sudo update_rubygems
And the credit goes here.
Finally, by all means avoid installing the gems manually, my experience taught me.
Seems like your Rubygems version is not up to date.
Try sudo gem update --system and/or sudo gem install rubygems-update; sudo update_rubygems before trying to install the heroku gem.
Alternately, if you're running Debian and cannot use gem update --system, try installing a version of rubygems that is >1.2 from backports. I used aptitude -t lenny-backports install rubygems and then rubygems could actually access the online repository.
To install Heroku in all currently supported versions of Ubuntu open the terminal and type:
sudo snap install --classic heroku
This installs the heroku snap package successfully, and it is the recommended way of installing Heroku CLI in Ubuntu at the Heroku Dev Center website. When this was posted sudo snap install --classic heroku installs the latest version of Heroku.
Related
I am trying to install cocoapods onto my computer. I did the following:
sudo gem update--system
Password:
and I got the following text:
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command update--system
Kind of confused as to how to fix this.
If you are trying to update gems before installing cocoapods, you need to do
sudo gem update --system
You forgot the space between update and --system.
To install cocoapods, you need to use the following command:
sudo gem install cocoapods
My ultimate goal is to get this to work in an Ubuntu 14.04 Docker container: https://github.com/byalextran/autoluv
When I run
m1#9bdc67007b49:~/autoluv$ bundle install --deployment
It says:
Fetching unf_ext 0.0.7.4
Installing unf_ext 0.0.7.4 with native extensions
Errno::EACCES: Permission denied # rb_sysopen - /home/m1/autoluv/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4/.document
An error occurred while installing unf_ext (0.0.7.4), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.4' --source 'https://rubygems.org/'` succeeds before bundling.
But when I run
sudo gem install unf_ext -v '0.0.7.4' --source 'https://rubygems.org/'
unf_ext-0.0.7.4 installs fine?
Building native extensions. This could take a while...
Successfully installed unf_ext-0.0.7.4
1 gem installed
Installing ri documentation for unf_ext-0.0.7.4...
Installing RDoc documentation for unf_ext-0.0.7.4...
I cannot figure out the next step. I've tried installing ruby-dev and gcc, but neither has helped move this along :(
Any and all help is much appreciated!
I had this same problem and the reason was that I did not installed all the dependencies that bundler needs to run
just try to:
sudo apt-get install build-essential
then run again
gem install bundler
and lastly
bundler
There is a difference between running commands with sudo and without. You can get more info about this command here https://kb.iu.edu/d/amyi.
Errno::EACCES usually happens when bunder has no access to a needed folder or it doesn't exist.
Try to gem install unf_ext -v '0.0.7.4' --source 'https://rubygems.org/' without sudo.
I had same issue on Fedora.
I simply had to install the gcc-c++ package.
I solved this error on Debian 10 buster in my ChromeOS Linux container by installing rbenv: sudo aptitude install rbenv or sudo apt install rbenv.
Aptitude package manager seems to be better at resolving dependencies and allowing me to install newer packages more easily than the default apt so I thought it was worth mentioning.
Solved it after using following commands for Xcode 13, BigSur :
softwareupdate --install a
sudo port upgrade outdated
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install wget
brew install build-essentials
bundler install
If you are an iOS developer who is getting this error, this might be related to your Xcode command line tools selection.
Just run the following command with the path of the Xcode that you are using currently.
sudo xcode-select --switch /Applications/Xcode.app
You need to use the latest version of Ruby.
If you are using MacOS, system Ruby is old and outdated. you can not update the system Ruby, but you can install another version of Ruby and make it default global using rbenv ruby version manager tool.
finally you can install any ruby packages you like.
I had this problem "https://stackoverflow.com/questions/19612185/unable-to-install-cocoapods-gem-from-rubygems-org-bad-response-backend-read-e" and as one of the solutions said I tried to remove/add rubygem sources. It was removed without problem, but when I tried to add it back it's giving me an error.
Here's my action on terminal and response:
$ gem sources --add https://rubygems.org/
Error fetching https://rubygems.org/:
server did not return a valid file (https://rubygems.org/specs.4.8.gz)
Does anyone know what is the problem?
Here is Easy Steps for installing Ruby in your system to help to install Cocoapods in your machine, I solved the same issue with being below mentioned steps.
Install command line tools using the command
xcode-select --install
Install Homebrew by
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Ruby using homebrew
brew install ruby
Check Ruby version
ruby -v
Install Ruby
gem source -a http://rubygems.org/
gem install cocoa pods
sudo gem install cocoapods
or
sudo gem install -n /usr/local/bin cocoapods
Go to below folder
cd ~/.cocoapods/repos
Run the below command
git clone https://github.com/CocoaPods/Specs.git master
Go to the directory where Podfile is present and run
pod install
Happy Coding😊
Steps:
1. sudo gem install cocoapods
2. pod install
3. pod update
ensure that you are connected to internet. Your system is unable to find the latest version of gems, required by pods
I successfully installed ruby on my Ubuntu server by using the following command.
1-sudo apt-get install python-software-properties
2-sudo apt-add-repository ppa:brightbox/ruby-ng
3-sudo apt-get update
4-sudo apt-get install ruby2.1
But when i tried to install Rails version 4.2.0 using the below command.
gem install rails --version=4.2.0
i got the following error.
Error:
Error:While executing gem (Errorno-EACCES)
permission denied # dir_s_mkdir - /var/lib/gems
Please help me to resolve this error and install rails successfully.I also have another doubt here.After installing ruby when i chcked the version it is showing me the ruby version 2.1.7 but here i need ruby version 2.1.5.Please also help me do this.I am using Ubuntu 14.0 version.
The issue might be because the gem executable is not installed in user directory.
You can confirm this using which gem.
Run this command for installing rails.
sudo gem install rails --version=4.2.0
UPDATE:
The error : Errror: Error installing rails Error: failed to build gem native extension might be because of lack of dev-headers.
Try running this :
sudo apt-get install ruby2.1-dev
These errors are the reasons you should probably try using rbenv or rvm to install ruby and rails.
I'm getting an error when I run 'gem install cocoapods' on OSX Mavericks.
$ gem install cocoapods
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - bad response backend read error 503 (https://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/cocoapods-0.27.1.gemspec.rz)
ERROR: Possible alternatives: cocoapods
Please note that I can download the cocoapods-0.27.1.gemspec.rz directly. I am running the latest version of XCode (5.0.1) and the latest version of its CLI tools. RVM is also configured to run the latest Ruby version (2.0.0p247)
Sometimes ,the default source for gem, https://rubygems.org/, can't be accessed.
It should be removed by command:
gem sources -r https://rubygems.org/
And then new source should be added:
gem sources -a https://ruby.taobao.org/
Update the cache:
gem sources -u
You can check sources with:
gem sources
Finally , you can install cocoapods:
sudo gem install cocoapods
Use the below mentioned steps to install Cocoapods in your machine,
I solved the same issue with be below mentioned steps
1.Install command line tools using the command
xcode-select --install
2.Install Home brew by
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
3.Install Ruby using homebrew
brew install ruby
4.Check Ruby version
ruby -v
5.Install Ruby
gem source -a http://rubygems.org/
6.gem install cocoapods
sudo gem install cocoapods
or
sudo gem install -n /usr/local/bin cocoapods
7.Go to below folder
cd ~/.cocoapods/repos
8.Run the below command
git clone https://github.com/CocoaPods/Specs.git master
9.Go to the directory where Podfile is present and run
pod install
It work for me:
Remove https source by command:
gem sources -r https://rubygems.org/
And then new http source should be added:
gem sources -a http://rubygems.org/
Update the cache:
gem sources -u
Though I'm not sure what caused read error 503 I was able to work around the problem fairly easily by manually installing the cocoapods.gem.
If anyone else experiences similar problems (with cocoapods or any other gem), download the appropriate gem file (cocoapods-0.27.1.gem in my case) directly from RubyGems.org. Then run the gem install cocoapods-0.27.1.gem. The install command will scan the working directory first, thus detecting and installing the local gem package, cutting out the broken repository.
I found that just removing and re-adding rubygems seemed to work for me ( using the High Sierra on Mac) I prefer to use the official Rubygems repos
gem sources -r https://rubygems.org/
gem sources -a https://rubygems.org/
gem sources -u
sudo gem install cocoapods
I assume it must have been a glitch..
This worked for me. Make sure to include sudo with install command.
gem sources -a http://rubygems.org/
gem sources -u
sudo gem install cocoapods
Just follow there steps and error is gone
1.Install command line tools using the command
xcode-select --install
2.Install Home brew by
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
3.Install cocapods using home-brew, it take care of everything
brew install cocoapods
4. Last step
pod setup
For me I had to change rubygems.org to be the gems url used at my company (which caches from rubygems.org).
I did sudo gem install cocoapods --source <my_company_url_for_gems>
Let all http replace https,because the right cocoa pods's sources is https://ruby.taobao.org/