Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Yes, you would write non-trivial install scripts in ruby.

https://en.m.wikipedia.org/wiki/Chef_(software)



sort by: page size:

Because the install script is in ruby?

I made a screencast of that for anyone who prefers that method: http://www.rubyinside.com/how-to-install-ruby-1-9-2-and-rail...

Installing ruby on Ubuntu is easy. Most users of this kind of extension would probably know how.

rbenv[1] makes installing and managing Ruby pretty damn straightforward, at least on *nix. Once you have Ruby itself up and running, installing any needed Gems is child's play.

[1] https://github.com/rbenv/rbenv


Sure you've read the post? It's a Go tool with install shortcuts for Ruby and JS. It works with everything.

Does this also apply to end-users of Ruby apps that are just an apt-get away? I don't really want to learn all that stuff (and remember to redo it on all installs) just to use some tool that happens to be written in Ruby.

You CAN use apt-get to install ruby packages. But it totally totally sucks.

(And as for the Ubuntu thing. I keep around the tarball with the ruby gem source, and have a script that scps, untars, and runs the install script. I have to type in the root password, but thats about it. Its definitely not ideal, but there are worse things ;))


Some of these issues can be resolved using Ruby Install https://github.com/postmodern/ruby-install

Good point. Hopefully the Homebrew installer script will bootstrap this for you. They already build and distribute binary packages, they probably can easily download the existing Ruby package and execute it.

I support Ruby apps so Ruby is on every server anyways.

With that said you can use Omnibus Chef Installer now which includes a copy of Ruby just for Chef. Good for servers where you don't need Ruby or small servers that would take awhile to compile a newer Ruby.


If you're a Rubyist, "gem install cheat" (http://cheat.errtheblog.com/)

Annoyingly, Homebrew installation (one of the best ways to get these scripting languages installed) assumes you already have Ruby installed. I wonder if they’ll finally rewrite the install script in pure Bash.

I guess it depends on what you're writing. Using rbenv and bundler keeps ruby apps in check, but if you want to install a whole load of stuff, you could take a look at Vagrant (http://www.vagrantup.com).

You basically rewrite the current Ruby installer in a shell script that will download a Ruby version from Homebrew ...

Great project! Also, why not target the regular chef-client too? Managing a ruby installation with gems may be unnecessary on servers too.

Given that getting Ruby installed on those servers involves doing literally nothing, no, it isn't as easy.

Interesting concept. Coincidentally, I wrote a gem recently that serves the same function as the git-overwritten script at the end: https://github.com/ilyakava/stefon

gem install stefon


I agree. This would be far more awesome if you could install it with a fucking shell script. It is called fucking shell scripts. Not fucking ruby scripts.

I'm sitting in lecture right now, so here's a short version:

- Use http://beginrescueend.com/ to install ruby itself

- Use http://gembundler.com/ to manage project-level dependencies

Both of those sites have good examples, but if no one steps up I might just write something like the linked guide when time frees up.

next

Legal | privacy