librarian-puppet fails to install on windows - windows

I am new to puppet. I am trying to install librarian-puppet in my windows system. I have followed the following installation steps before I started to install librarian-puppet :
Download and install puppet from the windows msi file from https://downloads.puppetlabs.com/windows/ (NOT gem install puppet).
You must run everything from the "Start Command Prompt with Puppet" not a normal Windows Command prompt.
Before installing librarian-puppet the the Ruby DevKit is needed:
a. Select "Start Command Prompt with Puppet" to go to a Command Windows.
b. Download and install devkit from http://rubyinstaller.org/downloads
c. In the devkit directory run “ruby dk.rb init”.
d. Edit the config.yml generated and add the the path of the ruby install for puppet
(it will be /sys/ruby).
e. run “ruby dk.rb install” to bind it to the puppet ruby installation.
and finally I did:
gem install librarian-puppet
But the error I get is:
ERROR: Error installing librarian-puppet:
ERROR: Failed to build gem native extension.
and the output of execution looks like this:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing librarian-puppet:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.
1 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.1/ext/json/ext/ge
nerator/gem_make.out
Am I missing something here ? Any help would be appreciated.

If you install librarian-puppet 1.1.x or later it should not require the json gem that fails to build

Related

Failed to build gem native extension (installing ruby-debug-ide-0.7.1.beta3.gem)

I'm using
IntelliJ 2019.3.4 build #IU-193.6911.18
Jruby 9.2.11.0
Ruby 2.6.5 + DevKit
When I want to debug, I get a message from RubyMine debugger:
debugging gems are not installed. Would you like to install them?
When installing I get following message:
Following gems were not installed:
C:\Users\stomph\.IntelliJIdea2019.3\config\plugins\ruby\rb\gems\ruby-debug-ide-0.7.1.beta3.gem: Error installing ruby-debug-ide-0.7.1.beta3.gem:
ERROR: Failed to build gem native extension.
current directory: C:/jruby-9.2.11.0/lib/ruby/gems/shared/gems/ruby-debug-ide-0.7.1.beta3/ext C:/jruby-9.2.11.0/bin/jruby.exe mkrf_conf.rb current directory:
C:/jruby-9.2.11.0/lib/ruby/gems/shared/gems/ruby-debug-ide-0.7.1.beta3/ext
C:jruby-9.2.11.0binjruby.exe -S rake
RUBYARCHDIR\=C:/jruby-9.2.11.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/ruby-debug-ide-0.7.1.beta3
RUBYLIBDIR\=C:/jruby-9.2.11.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/ruby-debug-ide-0.7.1.beta3
rake failed
Cannot run program "C:jruby-9.2.11.0binjruby.exe" (in directory "C:\jruby-9.2.11.0\lib\ruby\gems\shared\gems\ruby-debug-ide-0.7.1.beta3\ext"): CreateProcess error=2,
The system cannot find the file specified
Gem files will remain installed in C:/jruby-9.2.11.0/lib/ruby/gems/shared/gems/ruby-debug-ide-0.7.1.beta3 for inspection.
Results logged to C:/jruby-9.2.11.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/ruby-debug-ide-0.7.1.beta3/gem_make.out
Native compilation failed. Please make sure that you have Ruby DevKit installed"
Ruby DevKit and rake are installed so I'm not getting what's wrong
The content of gem_make.out is:
current directory: C:/jruby-9.2.11.0/lib/ruby/gems/shared/gems/ruby-debug-ide-0.7.1.beta3/ext
C:/jruby-9.2.11.0/bin/jruby.exe mkrf_conf.rb
current directory: C:/jruby-9.2.11.0/lib/ruby/gems/shared/gems/ruby-debug-ide-0.7.1.beta3/ext
C:jruby-9.2.11.0binjruby.exe -S rake RUBYARCHDIR\=C:/jruby-9.2.11.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/ruby-debug-ide-0.7.1.beta3 RUBYLIBDIR\=C:/jruby-9.2.11.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.5.0/ruby-debug-ide-0.7.1.beta3
rake failed
Cannot run program "C:jruby-9.2.11.0binjruby.exe" (in directory "C:\jruby-9.2.11.0\lib\ruby\gems\shared\gems\ruby-debug-ide-0.7.1.beta3\ext"): CreateProcess error=2, The system cannot find the file specified
After trying a lot the following solved the problem:
gem install ruby-debug-ide
Then ruby-debug-ide-0.7.0.gem is installed and everything is working!

Error installing jekyll: ERROR: Failed to build gem native extension

I use github+jekyll to build blog, i try to install jekyll to local(windows 10), while it failed when i rungem install jekyll and the stack trace is
C:\Developments\FrontEnd\rubygems-2.7.7>gem install jekyll
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: C:/Developments/FrontEnd/Ruby25-x64/lib/ruby/gems/2.5.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
C:/Developments/FrontEnd/Ruby25-x64/bin/ruby.exe -r ./siteconf20180806-33956-l8y76h.rb extconf.rb
creating Makefile
current directory: C:/Developments/FrontEnd/Ruby25-x64/lib/ruby/gems/2.5.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean
'make' is not recognized as an internal or external command,
operable program or batch file.
current directory: C:/Developments/FrontEnd/Ruby25-x64/lib/ruby/gems/2.5.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
'make' is not recognized as an internal or external command,
operable program or batch file.
make failed, exit code 1
what i do is:
1. install ruby, path variable was set, version: ruby 2.5.1p57 (2018-03-29 revision 63029) [x64-mingw32].
2. install rubygems, version: 2.7.7.
3. install MSYS2.
4. install jekyll, gem install jekyll, then the above error occurs and i'm not sure the reason.
i have tried to install devkit and it not works, i think my ruby version is 2.5+, so don't need devkit and i have uninstalled it.
Anyone could help me?
Although they made the Ruby+DevKit an "optional" download for the RubyInstaller on Windows, if you plan to install gems, it is practically a necessity. A large percentage of the most popular gems are C extension that will need built on your machine when being installed.
The DevKit is a handy toolchain that supplies everything you need for this to be done, automatically without you needed to do anything more than type gem install XXXXX. Without it, you either cannot use C extension gems, or must have already installed MSYS and MingW, have them configured properly, which is all not a user-friendly experience, even for those who familiar with the process.
So even if DevKit is optional, it is still required to make the most of Ruby on Windows.
Solution re-install ruby with rubyinstaller-devkit-2.5.5-1-x64
and issue
gem install bundler
gem install jekyll
I got the same error message. It turned out that the culprit was the ffi gem. I got it to work using this solution.
I had the same issue. I was able to resolve it (in Windows 11 x64) via:
winget install -e --id RubyInstallerTeam.RubyWithDevKit
(I.e., reinstall Ruby with the DevKit)

ERROR: Error installing json: ERROR: Failed to build gem native extension

I am trying to install gem json and getting error for json.
I'm running:
Windows 8.1 (64 bit)
Ruby: ruby 1.9.3p545 (2014-02-24) [i386-mingw32]
gem: 1.8.2
D:\GIT\calabash>gem install json -v '1.8.3'
Building native extensions. This could take a while...
The system cannot find the path specified.
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.3 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.3/ext/json/ext/generator/gem_make.out
D:\GIT\calabash>
Its a late response, but may it helps someone else. to install json '1.8.3' it requires packages 'libgmp3-dev'.
Use following steps:
sudo apt-get install libgmp3-dev
gem install json -v '1.8.3'
For anyone who has this issue on Sierra, I solved the problem through this thread: https://teamtreehouse.com/community/installing-ruby-on-mac-got-error
Coles notes version is that after updating to most recent version of XCode, I had to accept the terms for the XCode command line tools. See them/agree to them by running:
gcc --version
After I did that, everything installed as expected.
To help you here are some steps to follow in order to install your gem locally:
Download json-1.8.3.
Place the downloaded gem into a folder called gems
Open the Ruby cmd console (click on start button, select Ruby then select "Start command prompt with Ruby")
cd to the gems folder. If the path to the folder is C:\Desktop\gems, write the command: cd C:\Desktop\gems then click "Enter".
To install the gem run the following command:
gem install --local json-1.8.3.gem
I tried it and it worked for me, hopefully it will work for you.
Result:
Second way:
Include the whole path of the gem in the command:
gem install --local C:\Users\kedarl\Desktop\T\json-1.8.2.gem
For me here is the result. (This time with the json-1.8.2.gem):
I've solved this by installing Command Line Tools Xcode of the version I have. I hope this helps someone else.
If you installed Rails through RailsInstaller, try this -
https://gist.github.com/luislavena/f064211759ee0f806c88
It's a pretty common bug for RailsInstaller currently.

Unable to install atomic v1.1.13 gem via bundler

I have tried to install atomic gem via bundler. I'm getting the below error message:
**Installing atomic 1.1.13 with native extensions The system cannot find the path specified.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.
c:/Ruby200/bin/ruby.exe extconf.rb
creating Makefile
Gem files will remain installed in
c:/Ruby200/lib/ruby/gems/2.0.0/gems/atomic-1.1.13 for inspection.
Results logged to
c:/Ruby200/lib/ruby/gems/2.0.0/gems/atomic-1.1.13/ext/gem_make.out An
error occurred while installing atomic (1.1.13), and Bundler cannot
continue.**
Could you help me to overcome from this issue. Thanks
To help you here are some steps to follow in order to install your gem lacally.
Download atomic 1.1.13 from RubyGems:
atomic 1.1.13
Place the downloaded gem into a file called gems
Open Ruby cmd consol [clic on start button, select Ruby then select Start command prompt with Ruby]
Cd to the gems file path [lets supose the path of your gems file is C:\Desktop\gems] write the command: cd C:\Desktop\gems then clic enter.
To install the gem run the following comand: gem install --local atomic-1.1.13.gem
I tried it and it worked for me, hopefuly it will work for you.

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

Resources