While I appreciate the desire to bring rmate into the rubygem fold, it presents some difficulties.
Prior, I could install rmate into ~/bin on any machine I had ssh access to, quickly and easily by copying the guts of the script. This let me minimize my impact on remote machines that I needed to work on. (FWIW, I do most of my work on client machines of, let's say, older vintage, with extremely locked down environments. rmate is my secret sauce.)
Now, I find myself needing to install rubygems on the remote machine, just to keep working, and without admin access.
In the interest of retaining my remaining hair, what's the quick and dirty way of installing rmate on remote machines now, when one does not have admin rights to do a simple install of rubygems?
Failures:
% rmate mpp /work/users/jsmith/bin/rmate:12:in `require': no such file to load -- rmate (LoadError) from /work/users/jsmith/bin/rmate:12
[ install rubygems in ~/bin ]
% gem install rmate /work/users/jsmith/bin/gem:8:in `require': no such file to load -- rubygems (LoadError) from /work/users/jsmith/bin/gem:8
% printenv GEM_HOME ~/bin/gems/
On 18 Mar 2013, at 20:12, Jason McC. Smith wrote:
In the interest of retaining my remaining hair, what's the quick and dirty way of installing rmate on remote machines now, when one does not have admin rights to do a simple install of rubygems?
Afraid it won’t work without rubygem because of how it has moved the version to a required file and rely on the rubygem loader to setup the load path.
I would like to once again have rmate a self-contained file, the only reason for splitting it up was to share the version include with the gemspec file — but I think it could be handled by refactoring the rmate executable to be usable as a library as well (with all symbols encapsulated in a module).
Short-term though my goal was to just make auto-updating work (via rubygem).
If you need the self-contained version you will need to either grab the version prior to the gemification commit or maybe give the bash port a try: https://github.com/aurora/rmate
If you know ruby you may also submit a pull request to make it possible to ‘require "rmate"’ from the gemspec to be able to access ‘Rmate::VERSION’ :) Though come to think of it, there might be an issue requiring files w/o a .rb extension, or maybe that was another language which had this requirement…
On 19 Mar 2013, at 13:39, Allan Odgaard wrote:
[…] If you need the self-contained version you will need to either grab the version prior to the gemification commit or maybe give the bash port a try: https://github.com/aurora/rmate
The changes have been made to keep bin/rmate self-contained for installing w/o rubygems: https://github.com/textmate/rmate#standalone
Btw: Latest TextMate now listens on the IPv6 interface, this means that when setting up a tunnel one must use ‘localhost’ rather than ‘127.0.0.1’. Unfortunately the README and blog post previously used the former, which presumably many people copy/pasted and will now have to update.