Ruby Rake, Jenkins gem not included - ruby

We are currently moving our install of Jenkins from one server to another. Someone else set up Jenkins originally and I am running into difficulties setting it up on the new server (and they aren't here to ask about it)!
Basically it fails on this line:
require 's3'
I believe what it is trying to do is import the amazon sdk. I installed this by doing a
gem install s3
Which worked, but it still can't seem to recognise it as there and include it.
I installed ruby with RVM, and have put everything on PATH (on the server and on Jenkins)
Ruby is run through Jenkins with the rake plugin.
Maybe I configured the PATH wrongly?
Any suggestions would be great, thanks!

Related

How to install Ruby Gems for Vagrant, i.e. for usage in a Vagrantfile and executed on the host, on linux and windows?

I am using Vagrant for provisioning virtual machines. The Vagrantfile executes some custom Ruby code on the host. (This Ruby code is executed directly in the Vagrantfile, but could also be executed as part of a proper Vagrant plugin. It is the same situation.)
I would like to use the functionality of 3rdparty Ruby Gems in this very code, but I'm not sure how to properly install the Gems in the Vagrant context.
1) I don't know how Vagrant invokes Ruby. Is it some modified Ruby interpreter for Vagrant? Or is it a standard Ruby installation?
2) How do I, preferably on the command line (linux shell/PowerShell), install Ruby Gems that can be used from the Vagrantfile? Is there a special location for the Gems so that Vagrant can include them?
I would write about what I did so far at this point, but I just don't know where to start. This seems to be an uncommon use case, because I haven't found anything that goes into this direction. Maybe the answer is obvious, but I seem to lack proper understanding of what is required for Vagrant/Ruby to 'see' an installed Ruby Gem.
According to the documentation for Vagrant plugins:
This installs a plugin with the given name or file path. If the name is not a path to a file, then the plugin is installed from remote repositories, usually RubyGems.
# Installing a plugin from a known gem source
$ vagrant plugin install my-plugin
I don't use Vagrant so I can't confirm that it works, however a quick search shows that someone else wanted to accomplish the same goal and this worked for them:
require 'inifile'
settings = IniFile.load(CONFIGFILE)
Message: LoadError: cannot load such file -- inifile
I found that I can get these to work if I do:
vagrant plugin install inifile

install redmine on windows 10 have failed

hello there i'm trying to install redmine on windows 10 ,i have tried to install with bitnami and it have error on
installing gems any one will give me a solution on installing redmine
on windows 10. i prefer to use iis web server
,also i have tried "windows web platform installer" with "helicon zoo"
and had error on finding file , and i have tried to install it without
package manager http://coreboarder.com/blog/?p=465 and it failed on
step 4.3 so i skipped but again it failed on step 5.2 when executing
"ruby dk.rb install"
i haven't used ruby ever before am i missing something
thanks in advance
ps , i have added error snapshot in bellow
bitnami
bitnami
bitnami
helicontech.com/zoo/
if you are installing Redmine in your local system which has OS Windows 10, you no need to install all the required set of Softwares separately, you can go and download the Bitnami Redmine here
the download is an installer you can easily install all the software includes Database aswell.
I think this will helps you.
I do not know why you are trying to install redmine the ways you quote usually first check if it is already installed via command prompt and write, gem list.
If not installed, gem install 'redmine' or gem update 'redmine'
I would do a check to see if redmine is actually still an active gem.

How to install logstash-input-jmx in RHEL?

Has anyone installed logstash-input-jmx (or any other "community" plugin for Logstash) in RHEL?
How did you manage the Ruby/gem dependencies?
After installing a recent version of Ruby, RubyGems, and Rails, the development/runtime gem dependencies have to be resolved, but attempting to install any of the gems mentioned in here, would lead to endless missing dependencies ...
Are there any packaged versions of Logstash JMX plugin around?
Thanks,
Babak.
Welcome to the house of fun. What I did was, which may be out of your scope but it might help....
$logstash_location/bin/logstash-plugin list
(as you might expect this shows what can be installed to your instance)
$logstash_location/bin/logstash-plugin install logstash-input-jmx
The plugin itself should resolve its own dependencies. I was having all sort of problems in Docker, but I had to build my Logstash tarball external to the machine. Make sure connectivity is ok too. It's a service, not local to your machine.
This post clearly describes the steps required to install a "community" logstash plugin, and can be used to install jmx plugin on RHEL. I've tried it on RHEL 7.3.
The main thing to consider is that in RHEL 7.3 the logstash can be found under /usr/share/logstash/ rather than /opt/logstash

How do I deploy ruby into a server without compiling or installing?

I'm given a server without any root access and very limited access to do any stuff. And I'm trying to install ruby on that box. I have a look at Omnibus chef and it looks like they pack embedded-ruby inside the package. So, the server doesn't need ruby installed on that box. I'm trying to achieve the same thing. How can I package my own embedded ruby so I can deploy like a tarball to the box without any compiling or installing?
RVM supports installing pre-built binaries (RVM installs Rubies local to the user, no admin access required):
http://syntaxi.net/2012/12/21/installing-prebuilt-binaries-with-rvm/
It's a little different than just dumping a tarball on the machine, but it will setup paths and everything for you, so odds are it will actually work.

Local installation of ruby / rubygems with no root access

I have a machine at work from wich I'd like to run a script that gathers some information about other machines. I want to do it in Ruby, since it's what I know best, but I've ran into some problems, all apparently due to the same reason: I don't have root access in this machine.
So what I did was: Download ruby source, configure (with --prefix pointing to somewhere under my home dir), make, make install. Alright, ruby runs fine. Then I did the same with rubygems and installed it. Ok as well, untill I went to install my first gem.
I downloaded the gem package (sigh, lots of firewalls, can't just "gem install" something remote), net-ssh, and tried to install it locally. Got the infamous "no such file to load -- zlib". Clues about this led nowhere, so I tried the next approach: getting net-ssh's source. When it tries to require 'openssl' (or when I try it from irb), I get "no such file to load -- openssl".
All of these problems, apparently, could be solved by apt-getting or rpm installing, or whatever. Only problem is: I can't!
Any suggestions as to how I might proceed?
Thanks for the help,
Marcelo.
Closing this now.
I had to ask someone with root access to install zlib-devel and openssl-devel (I'm on RHEL). Couldn't make it otherwise.
I'm guessing there's probably a way of using the stuff inside said packages without installing them as root, but I couldn't do it.
Did you try Ruby RVM?
You can download, compile and install a full-featured Ruby version on your home environment.
I recently did the same. The trick that worked for me is NOT to use a --prefix flag when you install rubygems.

Resources