Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Ruby apt package instead of compiling from source #7

Open
vjpr opened this issue Aug 20, 2012 · 3 comments
Open

Use Ruby apt package instead of compiling from source #7

vjpr opened this issue Aug 20, 2012 · 3 comments

Comments

@vjpr
Copy link

vjpr commented Aug 20, 2012

Why is there are requirement for 1.9.2-p192?

There is a package on aptitude with 1.9.2p0. I've used this and it works. Compiling from source takes forever.

From http://www.ruby-lang.org/en/downloads/

Debian GNU/Linux uses the apt package manager system. (So does Ubuntu.) You can use it like this:

$ sudo apt-get install ruby1.9.1
Yes, this will install Ruby 1.9.2. It has a ‘library compatibility version’ of 1.9.1, hence the name.

@Flamefork
Copy link
Contributor

Sometimes it's critical to build exact patchlevel. And really, -p0 is way too old and have many bugs (for example, with yaml merging)

@leonid-shevtsov
Copy link

  1. There are PPAs (apt repositories) for more recent versions of Ruby, such as http://wiki.brightbox.co.uk/docs:ruby-ng, which (as of now) has the latest and greatest Ruby 1.9.3 p194.

  2. For Ruby projects: Assuming your chef recipes are going to install RVM to make upgrading Ruby easier, and then build the specific version of Ruby that the project requires, it really makes no sense to build another version for Chef when we can just use the system-provided one. I'm fairly sure Chef is tested on common system rubies.

  3. For non-Ruby projects: we care about the Ruby version even less.

@leonid-shevtsov
Copy link

Fortunately, the installation method is completely configurable.

set :care_about_ruby_version, :false
set :ruby_dependencies, %w(build-essential)
set :ruby_install_script, "apt-get install -q -y ruby1.9.1 ruby1.9.1-dev"

(Ruby itself doesn't need build-essential, but it's required to compile Chef dependencies).

But even this is not the optimal approach!

Chef has official packages available for Debian/Ubuntu. It only makes sense to use them instead of mucking around with ruby-build, gem installs and such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants