Error while installing heroku using gem on Windows - heroku

While installing heroku I will get the below mentioned error:
$ gem install heroku
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing heroku:
ERROR: Failed to build gem native extension.
current directory: c:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/heroku-3.99.4
c:/RailsInstaller/Ruby2.3.3/bin/ruby.exe -r ./siteconf20181030-11376-16mqlg7.rb extconf.rb
extconf.rb:1:in `<main>': heroku must be installed from cli.heroku.com. This gem is no longer available. (RuntimeError)
extconf failed, exit code 1
Gem files will remain installed in c:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/heroku-3.99.4 for inspection.
Results logged to c:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/heroku-3.99.4/gem_make.out
What's the problem, and how can I fix it?

Heroku's Ruby CLI is no longer maintained and shouldn't be used:
heroku must be installed from cli.heroku.com. This gem is no longer available.
Any resources telling you to install the Ruby CLI are outdated.
The new CLI is built in JavaScript. Heroku provides installers for macOS and Windows, and a snap for Ubuntu. It is also possible to install the CLI via npm, but this isn't recommended in most instances.

Instead of trying gem install, check out an alternative installation method for heroku, like downloading heroku-win32-x64.tar.gz and uncompress it in a folder of your choice.
Then make sure to add it to your %PATH%.
Or $PATH if you are in a git bash session:
export PATH=$PATH:/c/path/to/heroku

Related

ruby- packetgen installation gives gem install error

I'm trying to install packetgen, a library for crafting and manipulating network packets. I followed all the instructions, and installed all the necessary libraries. However, when I ran sudo gem install packetgen
to install it on my Linux machine it raised an error:
ERROR: Error installing packetgen:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/pcaprub-0.12.4/ext/pcaprub_c
/usr/bin/ruby2.3 -r ./siteconf20181009-29130-us1azm.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/pcaprub-0.12.4 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0 /pcaprub-0.12.4/gem_make.out [here][1]
I ran the command as sudo, but got the same error. Does anyone know what I'm doing wrong here? The link to installation instructions is here.
Don't use sudo gem install but rather it is highly recommended that you use a ruby version manager, probably RVM, for more reasons why, see 'sudo gem install' or 'gem install' and gem locations
Based on your error it looks like you're trying to use your system ruby which will likely have permission and/or library dependency issues. These are easily solved by using a version manager which has many advantages including the ability to use different ruby versions on the same system and not having to use sudo or root level installs of gems.
You can install RVM from here
Instructions on gem link you posted do say gem depends on sudo apt install libpcap-dev which is a system lib your gem needs to build. I assume you did that step already right?

Error Installing Jekyll in Cygwin

So I attempted to install Jekyll on Windows through Cygwin and I encountered an error when I tried to install Jekyll through Cygwin. Here is the output.
Michael#X556UAK: ~$ gem install jekyll
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: /c/Users/Michael/.gem/ruby/2.3.0/gems/ffi-1.9.18/ext/ffi_c
/usr/bin/ruby.exe -r ./siteconf20171011-7692-lgoixq.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /c/Users/Michael/.gem/ruby/2.3.0/gems/ffi- 1.9.18 for inspection.
Results logged to /c/Users/Michael/.gem/ruby/2.3.0/extensions/x86_64-cygwin/2.3.0/ffi-1.9.18/gem_make.out
I conducted some research online and I wasn't able to find a solution. I tried running Cygwin as an administrator and I still got that error message.
What can I do to fix this issue?
I had the same issue when installing Jekyll and Ruby in the Windows 10 Bash Linux Subsystem. It turned out, that the development package from Ruby was missing. I had to install it first:
sudo apt-get install ruby2.4-dev
In my case. Try to install the dev package in Cygwin package manager, in your case its version 2.3.
Andy
For the record, I encountered the same problem Michael did, and installing the ruby-devel package (using the Cygwin Setup installer) solved my problem. A missing *-devel Cygwin package is a common cause of errors about missing header files.

installation of jekyll failed - Windows

I am trying to install jekyll on a 32 bit windows 7 PC . I downloaded ruby installer-32 bit and 32 bit devkit and extracted un ruby install folder.i got some ssh error which i resolved by temporarily switching to http instead of https and then updated gems as well as installed bundler using
gem install bundler
however gem install jekyll gives following error
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
C:/Ruby21/bin/ruby.exe -r ./siteconf20150109-5804-1k3wbva.rb extconf.rb
No such file or directory - C:/Ruby21/bin/ruby.exe -r ./siteconf20150109-5804-1k
3wbva.rb extconf.rb 2>&1
Gem files will remain installed in C:/Ruby21/lib/ruby/gems/2.1.0/gems/fast-stemm
er-1.0.2 for inspection.
Results logged to C:/Ruby21/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/fas
t-stemmer-1.0.2/gem_make.out
You need to install the Ruby DevKit to fix the error you're seeing. Any sane Ruby install has the ability to build stuff on the fly.
I would start with Julian Thilo's awesome instructions for installing Jekyll on Windows:
Run Jekyll on Windows
If you are installing Ruby only for the purpose of running Jekyll, PortableJekyll will give you a full working Jekyll install in < 5 minutes.
Happy Jekylling...
I tried the same thing on 3 systems and found out that installing ruby gems fixed the issue .. so for anyone coming back at this question , this is how you install jekyll on a windows pc:
1.download and install ruby.
2.download devkit extract in to a folder(preferably inside ruby installation dir) and type in cmd window while in your devkit dir :
ruby dk.rb init
ruby dk.rb install
3.download and install gems by
ruby setup.rb
4. finally :
gem install bundler
gem install jekyll
*bundler is a jekyll dependency
I had the same issue on Windows 10 after installing Ruby+Devkit 2.5.X (x64) with the Windows installer.
The reason was that I changed the default path in the installer and had spaces in the path name. Apparently some make scripts do not like that.
Reinstalling to a path without any spaces fixed the issue.
Also see this related issue on github.
I failed to install "gem install jekyll bundler" when ruby was installed in "c:\program files\Ruby26-x64". After I reinstalled ruby on c:\Ruby26-x64 everything went ok. Seems like installation fails to parse path with blank

ERROR: Failed to build gem native extension. - can't install breakpoint and singularity

I installed compass and sass and everything worked correctly. But now I am trying to install singularity and breakpoint and I am getting this error over and over:
Sayras-iMac:~ sayralopez$ sudo gem install breakpoint
Building native extensions. This could take a while...
ERROR: Error installing breakpoint:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/ffi-1.9.3 for inspection.
Results logged to /Library/Ruby/Gems/1.8/extensions/universal-darwin-12/1.8/ffi-1.9.3/gem_make.out
I am still a newb at terminal commands, so I have no idea what is going on. I tried reinstalling and updating ruby and it still wont work. Any idea what could be going on and how to fix it?
MANY THANKS!
Install Ruby Version Manager first:
$ ruby install rvm
After installing rvm, I was able to install breakpoint and sigularity (and susy!)
Hope that helps!

Rubymine 6.0.2, unable to debug

On my new OSX Mavericks install, I wanted to give Rubymine a try and just can't get the debugger working (although i managed to get it working on Windows 7 with IntelliJ and the ruby plugin).
Here's what I did (XCode and commandline tools already installed):
homebrew install ruby
gem update --system
Then I installed Rubymine and opened some of my projects. Upon starting the debugger, rubymine tries to install dependencies:
Failed to Install Gems. Following gems were not installed:
/Applications/RubyMine.app/rb/gems/ruby-debug-ide-0.4.22.gem: Error
installing ruby-debug-ide-0.4.22.gem: ERROR: Failed to build gem
native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
mkrf_conf.rb Installing base gem You don't have write permissions for
the /Library/Ruby/Gems/2.0.0 directory.
/Library/Ruby/Site/2.0.0/rubygems/installer.rb:620:in
verify_gem_home'
/Library/Ruby/Site/2.0.0/rubygems/installer.rb:740:in
pre_install_checks'
/Library/Ruby/Site/2.0.0/rubygems/installer.rb:213:in install'
/Library/Ruby/Site/2.0.0/rubygems/request_set.rb:136:inblock in
install' /Library/Ruby/Site/2.0.0/rubygems/request_set.rb:120:in
each' /Library/Ruby/Site/2.0.0/rubygems/request_set.rb:120:in
install'
/Library/Ruby/Site/2.0.0/rubygems/dependency_installer.rb:389:in
install' mkrf_conf.rb:34:inrescue in ' mkrf_conf.rb:27:in ` ' rake
failed, exit code 1 Gem files will remain installed in /Volumes/OSX
DATA/Users/freakazoid/.gem/ruby/2.0.0/gems/ruby-debug-ide-0.4.22 for
inspection. Results logged to /Volumes/OSX
DATA/Users/freakazoid/.gem/ruby/2.0.0/extensions/universal-darwin-13/2.0.0/ruby-debug-ide-0.4.22/gem_make.out
/Applications/RubyMine.app/rb/gems/debase-0.0.9.gem: Error installing
debase-0.0.9.gem: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
extconf.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby:
invalid option -D (-h will show valid options) (RuntimeError) extconf
failed, exit code 1 Gem files will remain installed in /Volumes/OSX
DATA/Users/freakazoid/.gem/ruby/2.0.0/gems/debase-0.0.9 for
inspection. Results logged to /Volumes/OSX
DATA/Users/freakazoid/.gem/ruby/2.0.0/extensions/universal-darwin-13/2.0.0/debase-0.0.9/gem_make.out
I can without problems do a
gem install debugger
on my osx terminal
Any help out there?
You need to get the source files since they aren't included.
gem install debugger-ruby_core_source
Then try again.
Also, since I've found this sometimes isn't set correctly in Rubymine, in the menu bar go to "Rubymine" -> "preferences" -> "Ruby SDK and Gems" and make sure it is pointed to the version of Ruby you are expecting.
Thanks Beartech, you pointed me to the right direction:
Rubymine was looking for ruby in "/Library/..../ruby" and homebrew of course had ruby installed to another location. I had to edit my rubymine settings and point the ruby sdk to homebrew's ruby. Then i had to restart rubymine in order to successfully use the new sdk location. (I had previousl not restartet rubymine ...)

Resources