简体   繁体   中英

Installing rails 3 in ubuntu 11.04

I am trying to upgrade Rails 2.3.5 to 3.2.8 in my Ubuntu 11.04 system. I installed ruby and ruby gems. I have also installed the required libraries. I have followed the below link http://cicolink.blogspot.in/2010/10/how-to-install-ruby-rails-and.html

But when I run sudo gem install rails I get the following error in the command line

WARNING:  Error fetching data: SocketError: getaddrinfo: Name or service not known (http://rubygems.org/latest_specs.4.8.gz)
WARNING:  Error fetching data: SocketError: getaddrinfo: Name or service not known (http://rubygems.org/specs.4.8.gz)
ERROR:  While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: mail requires mime-types (~> 1.16), treetop (~> 1.4.8)

I have been trying to figure out this for last 2 days. Please help

(But when I run sudo apt-get install rails it successfully installed Rails2.3.5)

I know I'm not answering your question, but I recommend using RVM. RVM will help you set up and manage different ruby versions and gemsets. Using apt-get will also give you outdated releases, the current stable release of Rails is 2.3.8.

You can try following this tutorial, it's very easy and explains the process of setting everything up. It helped me a lot in setting up my machine (also Ubuntu 11.04) with Rails.

http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM