【发布时间】:2016-04-14 06:41:17
【问题描述】:
我正在开发 Rails 2.3.2 应用程序。我使用 RVM 安装了 Ruby 1.8.6。当我尝试运行bundler -v 或rails -v 等时,我收到以下错误:
venky@indeg:~/Desktop/practice/AppMonitor$ sudo gem install -v=2.3.2 rails
Successfully installed rails-2.3.2
1 gem installed
Installing ri documentation for rails-2.3.2...
Installing RDoc documentation for rails-2.3.2...
venky@indeg:~/Desktop/practice/AppMonitor$ rails -v
/usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find rails (>= 0) amongst [bundler-unload-1.0.2, executable-hooks-1.3.2, gem-wrappers-1.2.7, json-1.8.1, rubygems-bundler-1.4.4, rvm-1.11.3.9] (Gem::LoadError)
from /usr/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /usr/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
from /usr/local/bin/rails:22:in `<main>'
这是我的 rvm ruby 版本:
venky@indeg:~/Desktop/practice/AppMonitor$ rvm list
rvm rubies
=> ruby-1.8.6-p420 [ i686 ]
ruby-1.8.7-head [ i686 ]
ruby-1.9.1-p431 [ i686 ]
ruby-1.9.3-p551 [ i686 ]
* ruby-2.2.1 [ i686 ]
ruby-2.2.3 [ i686 ]
# => - current
# =* - current && default
# * - default
我尝试了一些链接,例如 Could not find bundler (>= 0) amongst [] (Gem::LoadError) with rails 2.3.18 和 Could not find rails (>= 0) amongst [] (Gem::LoadError),但没有帮助我。 请帮我摆脱这个..
【问题讨论】:
-
好的,我知道你的问题 ruby 的版本是什么
-
我使用的是 ruby 1.8.6
-
rvm 使用 ruby 1.8.6 试试这个
-
我已经在使用 ruby 1.8.6。
-
是的,绝对......它会正常工作,我正在给出答案
标签: ruby-on-rails