Ubuntu 12 - 如何正确安装 Ruby 和 Rails

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11391679/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 03:39:48  来源:igfitidea点击:

Ubuntu 12 - how to install Ruby and Rails correctly

ruby-on-railsrubyubuntu-12.04

提问by Alexandre

I read a lot of articles regarding installing Ruby 1.9and Ruby on Rails 3.2.3on Ubuntu 12. And I've installed them previously. But it took much time, about 5 days. I made many mistakes and I was very tired of that.

我阅读了有关安装了很多文章Ruby 1.9对和RubyRails 3.2.3Ubuntu 12。我以前安装过它们。但是花了很多时间,大约5天。我犯了很多错误,我对此感到非常厌倦。

Now I need to do it again. Obviously I want it to be effortless and correct. Like in Windows using Rails installer and Ruby installer.

现在我需要再做一次。显然,我希望它轻松且正确。就像在 Windows 中使用 Rails 安装程序和 Ruby 安装程序一样。

Can anyone give me a link about how to install them correctly(!)? Or maybe you know the right way?

谁能给我一个关于如何正确安装它们的链接(!)?或者也许你知道正确的方法?

回答by Kashiftufail

回答by Omar Awile

I would use RVM. I found it super easy to install and it maintains different per-user (or system-wide if you wish) gemsets for different projects.

我会使用RVM。我发现它非常容易安装,并且它为不同的项目维护不同的每个用户(或系统范围,如果你愿意)gemset。

回答by GBD

I always prefer rvm for installation of ruby and rails.

我总是更喜欢 rvm 来安装 ruby​​ 和 rails。

Here some very useful articles which guide you how to install ruby, rails using rvm.

这里有一些非常有用的文章,它们指导您如何使用 rvm 安装 ruby​​、rails。

1) http://coding.smashingmagazine.com/2011/06/21/set-up-an-ubuntu-local-development-machine-for-ruby-on-rails/

1) http://coding.smashingmagazine.com/2011/06/21/set-up-an-ubuntu-local-development-machine-for-ruby-on-rails/

2) http://hivelogic.com/articles/setup-guide-rails-stack-with-passenger-rvm-bundler-apache-and-mysql-on-ubun/

2)http://hivelogic.com/articles/setup-guide-rails-stack-with-passenger-rvm-bundler-apache-and-mysql-on-ubun/