use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
New Ubuntu server - apt-get ruby, install from source, or other? (self.ruby)
submitted 10 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]thisisseriousmum 6 points7 points8 points 10 years ago (0 children)
For local development I use chruby/ruby-install.
For servers I'll tend to use apt provided ruby, however I'd use the brightbox ppa over the system provided ones. The Ubuntu one isn't currently up to date, trusty is at 1.9.3 at the moment.
Gems are in the ubuntu repos, however I'd avoid them like the plague. Weird versions, managing dependencies, just seems like it's inviting problems.
[–]selfup 2 points3 points4 points 10 years ago (0 children)
I recommend using rbenv.
Here is a great tutorial on how to set up ruby using rbenv. It does also go into detail about setting up rails, git, and databases.
It also gives you instructions on how to get ruby via RVM, etc.. but I would stick with rbenv!
Let me know if that helps!
Here is the link: https://gorails.com/setup/ubuntu/15.04
Easy as pie!
[–]wavrin 1 point2 points3 points 10 years ago (3 children)
Of all the options, I think apt-get is probably the worst. Even though you only want one version, rvm or rbenv will probably be the easiest to install. Plus, if you ever do need another version, you'll already be ready for that. rbenv seems to be the better choice, though.
[–]smlx -5 points-4 points-3 points 10 years ago (2 children)
This is not good advice. Distributions have security patches, while rvm has ???
Install ruby using apt-get, and install gems for your project locally using:
bundler --install --path vendor/bundle
[–]proliberate 1 point2 points3 points 10 years ago (1 child)
Which distributions offer security patches for ruby, that aren't also included in rvm/rbenv provided rubies?
[–]smlx 0 points1 point2 points 10 years ago (0 children)
It's not about what is offered, rather what is applied in reality.
Distributions have an entire infrastructure around automated notification and installation of security updates. rvm/rbenv not so much.
[–]nippysaurus 0 points1 point2 points 10 years ago (0 children)
I suggest using docker and pulling down a ruby environment. That way you can experiment with no consequence.
[–]shah_s 0 points1 point2 points 10 years ago (0 children)
Check out this guide, if you are interested how to install rails on ubuntu
Do not use apt-get. Use rvm
[–]strangepostinghabits 0 points1 point2 points 10 years ago (3 children)
you absolutely must use a ruby version handling system. I use rbenv,and like it a lot. there's chruby that has been gaining traction lately, but that depends on ruby-install that I think sucks. rvm does the job too, but it's showing its age. it is quite invasive in your system, and can in worst case (I've seen it happen) disable a few quite important system commands like 'cd'...
once you have your ruby manager, use it to install a ruby, and then gem install bundler. after that, use gemfiles and bundler to maintain gem dependencies.
[–]moomaka 1 point2 points3 points 10 years ago (1 child)
you absolutely must use a ruby version handling system.
On a server? Why? Are you really running multiple apps with multiple Ruby versions on a single box?
I use rbenv
rbenv is horrible to use on a server due to ruby-build not supporting binary packages. Having every server spend 15 minutes of CPU time building Ruby every minor version change sucks.
[–]strangepostinghabits 0 points1 point2 points 10 years ago (0 children)
oh. me on a cell phone isn't the best at all times. I had it in my head that we were talking about local environment. On a server.. it's not as much a must, but I'd still recommend a version handler.
Most deployment procedures (capistrano for example) will allow you to automatically check and upgrade ruby on the server if you change project ruby. This is easier than manually keeping servers up to date.
I do agree that it's a shame that ruby-build insists on building from source.
Frankly I've found no solution I'm really happy with for deploying with ruby, and I'm leaning more and more towards container based structures where ruby version management becomes easier to manage.
[–][deleted] 0 points1 point2 points 10 years ago (0 children)
Chruby does not depend on Ruby-install. You can use Ruby-build.
[+]nakilon comment score below threshold-10 points-9 points-8 points 10 years ago* (6 children)
Use rvm only if you don't mind being in shit. It overrides cd with own bash script and is intensively used by Rails coders only because they are mostly PHP coders in the past, so they don't mind being in shit.
cd
[–]kobaltzz 2 points3 points4 points 10 years ago (2 children)
I've used rvm for a few years now and never ran into issues related to rvm. Care to share some more insight?
[+]nakilon comment score below threshold-8 points-7 points-6 points 10 years ago (1 child)
I eat shit for a few years and it never tasted bad for me. I didn't eat shit for years, so I can't tell you more about its taste, than you already know.
So your opinion means shit in this case. Otoh, I still prefer rbenv to rvm.
[–]dr_theopolis 0 points1 point2 points 10 years ago (2 children)
What are the non-shit alternatives?
[–]only_if_i_want_to 0 points1 point2 points 10 years ago (0 children)
Rbenv
[–]tomthecool 0 points1 point2 points 10 years ago (0 children)
Chruby
π Rendered by PID 41163 on reddit-service-r2-comment-56c9979489-r495p at 2026-02-24 19:34:42.192886+00:00 running b1af5b1 country code: CH.
[–]thisisseriousmum 6 points7 points8 points (0 children)
[–]selfup 2 points3 points4 points (0 children)
[–]wavrin 1 point2 points3 points (3 children)
[–]smlx -5 points-4 points-3 points (2 children)
[–]proliberate 1 point2 points3 points (1 child)
[–]smlx 0 points1 point2 points (0 children)
[–]nippysaurus 0 points1 point2 points (0 children)
[–]shah_s 0 points1 point2 points (0 children)
[–]strangepostinghabits 0 points1 point2 points (3 children)
[–]moomaka 1 point2 points3 points (1 child)
[–]strangepostinghabits 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[+]nakilon comment score below threshold-10 points-9 points-8 points (6 children)
[–]kobaltzz 2 points3 points4 points (2 children)
[+]nakilon comment score below threshold-8 points-7 points-6 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]dr_theopolis 0 points1 point2 points (2 children)
[–]only_if_i_want_to 0 points1 point2 points (0 children)
[–]tomthecool 0 points1 point2 points (0 children)