Open falkenbt opened 12 years ago
+1
Please do investigate!
I have come up with something in my local repo, I will look further into it and create a PR soon.
Why don't just use rvm: https://rvm.io/rvm/install/. You can create a gdash user, install RVM for that user, install the passenger gem, clone the gdash repo and just run passenger there. Something like this:
sudo useradd gdash
curl -kL https://get.rvm.io | sudo -u gdash -i bash -s stable --gems=passenger
sudo -u gdash -i git clone http://github.com/ripienaar/gdash.git
sudo -u gdash -i 'cd gdash; passenger start'
This is certanly a nice and simple procedure if you have... a) root access / the ability to add users b) internet access on the machine c) trust in https://get.rvm.io d) no policies that prevent installation of e.g. rvm
In my case, none of these criteria are fulfilled unfortunately. Creating a simple jar would make things much easier for us. I did this with warble. The downside is that the config is inside the jar as well but I'm sure there is a way to have it outside of the jar or to pass cmd-line args.
Another way would be to just run in with jruby without packaging anything. But this requires you need to have jruby installed on the target machine.
I commented the part of creating the user just for simplicity, but it is no required, you can use your local user. Actually, no root access is one of the motivations to use RVM. About trusting get.rvm.io... well you are trusting gdash, jruby and all the gems required ;). Internet access: you can always generate the rvm subdirectory in a different box with same binary specs and copy it.
But I understand the frustration of these policies, and if bundle it in a .jar helps to be compliance, that is welcome.
I get your points and I'm also not sure if java bundling will be the way to go. But obviously there is a demand, so I gave it a shot: https://github.com/ripienaar/gdash/tree/jruby Deliberately in a separate branch because it's far from being final or stable - notice the README.md. But I would be glad if anyone would like to test and give feedback (or even better: improve :-) )
Due to the miserable state of support for ruby > 1.8.5 on most linux distros (redhat, centos in our case) I would appreciate a JRuby packaging so gdash can be easily installed run in any environment that provides a JVM. I'm not a ruby expert so I don't know how much effort this would be (I have seen some native extensions that are being compiled within redcarpet). If someone would give me a heads-up on how to get started I would be happy to contribute.