在Ubuntu 11.10上安装Rails时出错(Gem :: DependencyError)

时间:2022-09-04 08:06:55

I'm trying to install Ruby on Rails on Ubuntu 11.10, but receiving this error:

我正在尝试在Ubuntu 11.10上安装Ruby on Rails,但收到此错误:

$ sudo gem install rails
ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: rails requires activesupport (= 3.2.3), actionpack (= 3.2.3), activerecord (= 3.2.3), activeresource (= 3.2.3), actionmailer (= 3.2.3), railties (= 3.2.3)

How can I fix this?

我怎样才能解决这个问题?

Note: Git (1.7.5.4 ) and Ruby (1.9.2p290) are installed properly.

注意:Git(1.7.5.4)和Ruby(1.9.2p290)安装正确。

2 个解决方案

#1


1  

What happens when you do the install without the sudo? does that work? If so, it may be a gem path / permissions issue. If that works, or even if it doesn't, check out 'sudo gem install' or 'gem install' and gem locations

在没有sudo的情况下进行安装会发生什么?那样有用吗?如果是这样,它可能是宝石路径/权限问题。如果可行,或者即使没有,请查看“sudo gem install”或“gem install”和gem位置

#2


0  

It is suggested to use the RVM

建议使用RVM

Also, according to rails 3.2.0 and heroku it seems you need to play with versions and typically not use the packaged version from your distribution but some GIT or other repo.

此外,根据rails 3.2.0和heroku,您似乎需要使用版本,并且通常不使用您的发行版中的打包版本,而是使用一些GIT或其他repo。

#1


1  

What happens when you do the install without the sudo? does that work? If so, it may be a gem path / permissions issue. If that works, or even if it doesn't, check out 'sudo gem install' or 'gem install' and gem locations

在没有sudo的情况下进行安装会发生什么?那样有用吗?如果是这样,它可能是宝石路径/权限问题。如果可行,或者即使没有,请查看“sudo gem install”或“gem install”和gem位置

#2


0  

It is suggested to use the RVM

建议使用RVM

Also, according to rails 3.2.0 and heroku it seems you need to play with versions and typically not use the packaged version from your distribution but some GIT or other repo.

此外,根据rails 3.2.0和heroku,您似乎需要使用版本,并且通常不使用您的发行版中的打包版本,而是使用一些GIT或其他repo。