Puppet - while installing puppet dashboard, a rubygems(rake) dependency is blocking - ruby-on-rails

I am trying to install puppet-dashboard on a linux machine (EL 6). But this installation is blocked by a dependency on rubygems(rake). But i have this already installed on my machine.
please find the below details which might be helpful for showing me the way forward.
[admin#server ~]$ ruby -v
ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
[admin#server ~]$ gem list
YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>= 2.0).
*** LOCAL GEMS ***
bundler (default: 1.16.1)
json (1.5.5)
rake (10.5.0)
below is what i see when i try to install puppet-dashboard
Loaded plugins: product-id, search-disabled-repos, security, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package puppet-dashboard.noarch 0:1.2.23-1.el6 will be installed
--> Processing Dependency: rubygem(rake) for package: puppet-dashboard-1.2.23-1.el6.noarch
--> Processing Dependency: ruby-mysql for package: puppet-dashboard-1.2.23-1.el6.noarch
--> Running transaction check
---> Package puppet-dashboard.noarch 0:1.2.23-1.el6 will be installed
--> Processing Dependency: rubygem(rake) for package: puppet-dashboard-1.2.23-1.el6.noarch
---> Package ruby-mysql.x86_64 0:2.8.2-1.el6 will be installed
--> Finished Dependency Resolution
Error: Package: puppet-dashboard-1.2.23-1.el6.noarch (puppetlabs-products)
Requires: rubygem(rake)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

I found the solution for this and now I am feeling silly to post this question since the answer to it is so simple.
I just went to this link https://rpmfind.net/linux/rpm2html/search.php?query=rubygem-rake and downloaded the Rake rpm, installed. and bam !! the puppet-Dashboard solves its dependency with the rake!

Related

"fat free crm" installation failling on Windows 10

I am trying to install fat free crm on a Windows 10 machine, but so far I have been unsuccessful. This is my latest attempt. Any help will be greatly appreciated.
Running bundler install gives me these messages:
Bundler 2.3.7 is running, but your lockfile was generated with 2.3.10. Installing Bundler 2.3.10 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 2.3.10
Installing bundler 2.3.10
Fetching gem metadata from https://rubygems.org/.........
Lots of successfully installed gems later:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node
C:/Ruby31-x64/bin/ruby.exe -I C:/Ruby31-x64/lib/ruby/3.1.0 -r
./siteconf20221119-16700-fgt0qd.rb extconf.rb
creating Makefile
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node/builder.rb:12:in
`build_libv8!': failed to download node 16.10.0 (Libv8::Node::BuilderError)
from
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node/location.rb:30:in
`install!'
from extconf.rb:9:in `<main>'
==== in
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node
==== running
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/libexec/download-node
extconf failed, exit code 1
My node version is v18.12.1, by the way. (Do I need an older one?)
Anyway, here is the exact sequence of actions before running bundler install inside my local git clone of fat_free_crm:
First, the repository I am using:
https://github.com/fatfreecrm/fat_free_crm
My Ruby version:
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]
For a fresh start, I uninstall all gems, including rails:
gem uninstall -aIx
The latest commit on the bin folder says: Upgrade to Rails 6 so I install the latest rails 6 version on my machine:
gem install rails -v 6.1.7
I clone the repository from github:
git clone https://github.com/fatfreecrm/fat_free_crm.git
Since I am using sqlite3 for this, I comment out all other db gems in the Gemfile and only leave this one:
gem 'sqlite3', '~> 1.4.0'
Then, I copy database.sqlite.yml into database.yml.
Then, I run bundler install from within the directory fat_free_crm, which gives me this:
Ensure you have either installed the shared-mime-info package for your distribution, or
obtain a version of freedesktop.org.xml and set FREEDESKTOP_MIME_TYPES_PATH to the location of that file.
I (hopefully) solved that problem with this stackoverflow solution: Error installing ruby on rails on windows 10
Afterwards, I run bundler install again, which gives the error messages that I mentioned at the top of my description.
Any help will be greatly appreciated.
P.S.: I am trying to get back into Ruby on Rails after a long break, so please forgive me, if I made any stupid mistakes.

Rails Error Can't Find freedesktop.org.xml

I've had some issues starting a new RAILS project, where I'm getting an error that there is a missing file /usr/local/share/mime/packages/freedesktop.org.xml. There was a connection with the mimemagic dependencies, and I found this issue on GitHub about the mimemagic version and licensing - https://github.com/rails/rails/issues/41750
Wondering if anybody else ran into the issue, and could explain what is going on.
I'm using rbenv with ruby version: 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19], and rails 6.1.3
Here is the error message in the command line:
Installing railties 6.1.3
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/nico/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/mimemagic-0.3.7/ext/mimemagic
/Users/nico/.rbenv/versions/3.0.0/bin/ruby -I/Users/nico/.rbenv/versions/3.0.0/lib/ruby/3.0.0 -rrubygems
/Users/nico/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.3/exe/rake
RUBYARCHDIR\=/Users/nico/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-19/3.0.0/mimemagic-0.3.7
RUBYLIBDIR\=/Users/nico/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-19/3.0.0/mimemagic-0.3.7
rake aborted!
Could not find MIME type database in the following locations: ["/usr/local/share/mime/packages/freedesktop.org.xml",
"/opt/homebrew/share/mime/packages/freedesktop.org.xml", "/usr/share/mime/packages/freedesktop.org.xml"]
Ensure you have either installed the shared-mime-types package for your distribution, or
obtain a version of freedesktop.org.xml and set FREEDESKTOP_MIME_TYPES_PATH to the location of that file.
Tasks: TOP => default
(See full trace by running task with --trace)
rake failed, exit code 1
Thanks,
Nico
Found some links to shared-mime-info on the GitHub link I posted, and I solved the issue by running the command below and starting a new project:
brew install shared-mime-info
If you are on ubuntu OS you can run below command
sudo apt-get install shared-mime-info
If migrating data from an Intel Mac (or an M1 Mac running Rosetta 2) to an M1, note that mimemagic will cache the old directory, so in addition to brew install shared-mime-info, you'll want to run:
gem uninstall mimemagic
gem install mimemagic

Error installing ruby on rails on windows 10

I wanted to install ruby on rails for windows 10, following the same instructions of this video: https://www.youtube.com/watch?v=G-B_KUFNkQQ
When it finish the installation of ruby, I return to the console and after gem install rails, I get this error:
C:\Users\Usuario>gem install rails --no-document
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mimemagic-0.3.9/ext/mimemagic
C:/Ruby27-x64/bin/ruby.exe -IC:/Ruby27-x64/lib/ruby/2.7.0/rubygems -rrubygems C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rake-13.0.1/exe/rake RUBYARCHDIR\=C:/Ruby27-x64/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/mimemagic-0.3.9 RUBYLIBDIR\=C:/Ruby27-x64/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/mimemagic-0.3.9
rake aborted!
Could not find MIME type database in the following locations: ["/usr/local/share/mime/packages/freedesktop.org.xml", "/opt/homebrew/share/mime/packages/freedesktop.org.xml", "/usr/share/mime/packages/freedesktop.org.xml"]
Ensure you have either installed the shared-mime-info package for your distribution, or
obtain a version of freedesktop.org.xml and set FREEDESKTOP_MIME_TYPES_PATH to the location
of that file.
Tasks: TOP => default
(See full trace by running task with --trace)
rake failed, exit code 1
Gem files will remain installed in C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mimemagic-0.3.9 for inspection.
Results logged to C:/Ruby27-x64/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/mimemagic-0.3.9/gem_make.out
I tried to solve making an update and "gem install mime-types-data" but stills with the same problem...
The Ruby Installer is Ruby+Devkit 2.7.2-1 (x64) and my ruby version is ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x64-mingw32]
Windows 10 ruby 2.6.2 install rails 6.0.0.rc1
Download the shared-mime-info from https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/0440063a2e6823a4b1a6fb2f2af8350f/shared-mime-info-2.0.tar.xz
Extract the downloaded package with 7Zip or WinRAR.
Place it in a location of your choice e.g. "C:\package".
Set a new Environment Variable with a name: FREEDESKTOP_MIME_TYPES_PATH and
browse value to the location e.g. C:\shared-mime-info 2.0\data\freedesktop.org.xml.in
Refresh terminal or CMD e.g. Command
refreshenv
And finally, gem install rails -v 6.0.0.rc1
windows 10
ruby : 2.5.8
I downloaded package from https://gitlab.freedesktop.org/xdg/shared-mime-info/ and then set the environment variable (Windows) FREEDESKTOP_MIME_TYPES_PATH to that path ("c:....\data\freedesktop.org.xml.in")
also I installed mime-types-data > gem install mime-types-data
at first it didn't work after closing and opening again the terminal it did.
tip: if you use vscode you need to reopen vscode
Mac
If you are using macOS, try the following
brew install shared-mime-info
bundle update mimemagic
the problem is that the mimemagic team yanked a lot of versions yesterday https://rubygems.org/gems/mimemagic/versions
now you have to install the package shared-mime-info in your distribution.
I would recommend using WSL for rails development in windows, it will save a lot of problems in the future.
after a quick google search, this seems appropriate:
from MimeMagic Github Page :
This process will also work on a Windows machine.
Download the package from
https://packages.debian.org/sid/amd64/shared-mime-info/download
Ensure the command line version of 7-Zip is installed
7z x -so shared-mime-info_2.0-1_amd64.deb data.tar | 7z e -sidata.tar "./usr/share/mime/packages/freedesktop.org.xml"
Place the file
freedesktop.org.xml in an appropriate location, and then set the
environment variable FREEDESKTOP_MIME_TYPES_PATH to that path.
Once that has been done the gem should install successfully.
Please note
that the gem will depend upon the file remaining in that location at
run time.
For MacOs or Linux - Install shared-mime-info package to resolve that issue.
macOS
$ brew install shared-mime-info
Debian, Ubuntu
apt-get update && apt-get install -y shared-mime-info

Passenger doesn't install with official Ubuntu Nginx package

So it looks like that I have some problems installing the recent passenger with official nginx packages. According to Passenger's official document here:
http://www.modrails.com/documentation/Users%20guide%20Nginx.html#install_add_apt_repo
I have done everything it tells from 2.3.1. My system is Ubuntu 13.10 and is currently installed the passenger Nginx via gem. Now I wish to change the service to using the official packages since I believe it does have better integration support, also along with better support with logrotate. So when I have executed the main command of installation:
sudo apt-get install nginx-extras passenger
It spits error showing this:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
nginx-extras : Depends: perl (>= 5.14.2-21+deb7u1) but 5.14.2-21build1 is to be installed
Depends: libgd2-noxpm (>= 2.0.36~rc1~dfsg) but it is not installable or
libgd2-xpm (>= 2.0.36~rc1~dfsg) but it is not installable
Recommends: passenger (< 4.0.34) but 1:4.0.33-1~wheezy1 is to be installed
E: Unable to correct problems, you have held broken packages.
I wonder why and how the dependency check is so strict to this degree. As it says I need packages for Debian but I am on Ubuntu so it is natural that the package names are slightly different. Can anyone make any solutions for this? Thanks very much.
Also, there is a side question: if this is successful, does Nginx automatically support IPv6?
In 2.3.1 step 3, did you add the Ubuntu 13.10 APT repo, and not the Debian 6/7 APT repo? How does your /etc/apt/sources.list.d/passenger.list look like?

Ruby on Rails install on ubuntu fail. I can has help?

I am trying to install Ruby, RubyGems, and the Ruby on Rails framework so that it will play nicely with my system. I am having issues with my installation. Could somebody help me? Here are the details of my system and how I went about installation.
Currently I am running ubuntu 10.10 using the Linux Kernel 2.6.35-28-generic. My server is Apache 2.2.16 and I use MySQL 5.1.49.
So, I went to my synaptic package manager and selected the following packages to download:
* ruby1.8 – installs Ruby 1.8.4
* libmysql-ruby – additional libraries to access MySQL
* libruby1.8-dbg – debugging library
* ri – Ruby Interactive Reference
* ruby1.8-dev – header files for building extensions
* rails – Ruby On Rails framework
Once that ran successfully, I downloaded rubygems from http://rubyforge.org/projects/rubygems/. Then I unpacked it, got in the terminal, ran a cd to get in the directory of the newly downloaded rubygems directory, and typed 'sudo ruby setup.rb' That ran with no problem and RubyGems 1.8.5 was installed. Then I ran 'sudo gem install rubygems-update' with no problem.
But when I ran 'sudo gem install rails –include-dependencies' I got the following output:
Fetching: activesupport-3.0.8.gem (100%)
Fetching: rails-3.0.8.gem (100%)
Successfully installed activesupport-3.0.8
Successfully installed rails-3.0.8
2 gems installed
Installing ri documentation for activesupport-3.0.8...
Installing ri documentation for rails-3.0.8...
File not found: lib
ERROR: While generating documentation for rails-3.0.8
... MESSAGE: exit
... RDOC args: --ri --op /var/www/testingwww/rubygems-1.8.5/nclude-dependencies/doc/rails-3.0.8/ri lib --title rails-3.0.8 Documentation --quiet
When I run 'rails -v' I get 'Rails 3.0.8' so it seems to have installed despite the error. But when I try to make a rails app by typing 'rails ./helloWorld' I get the manual page for the rails keyword.
I have looked around for two days now on how to fix this issue, but can't seem to figure it out. Does anybody know how to fix this?
Rails 3 requires version 1.8.7 or 1.9.2.
I'd recommend using RVM to manage your Ruby installation and environments. It will really help to get you going quickly and is simple. It's as simple as
curl -L https://get.rvm.io | bash
to install RVM and then rvm install 1.9.2 will get you going.
Have a look at https://rvm.io for more information.
In addition to Matthew's good Answer, I don't know why you're doing rails ./helloWorld. To generate a new app in Rails 3, you should do rails new helloWorld.
If you need a complete guide to getting rolling with Rails under Ubuntu, you can find a short guide here: http://blog.dcxn.com/2011/06/21/rolling-with-rails-3-on-ubuntu-11-04/
The gist is:
Install RVM (The Ruby version manager)
Install Rails from gem
Get going with Rails
It's a simple process but there are a few things you need to do for it to be completely smooth like making sure you have the pre-requisites for rvm installed via apt before install rvm.
Good luck!

Resources