【问题标题】:ERROR: Error installing jquery-rails: activesupport requires Ruby version >= 1.9.3. in Ubuntu 10.04错误:安装 jquery-rails 时出错:activesupport 需要 Ruby 版本 >= 1.9.3。在 Ubuntu 10.04 中
【发布时间】:2013-09-11 12:23:22
【问题描述】:

我正在尝试在最新的 gem 版本中安装最新的 ruby​​ 和最新的 rails

我安装了 rvm 并创建了一个名为 hotel 的新 gemset

~$ rvm use ruby-2.0.0-p247@hotel 
Using /home/circar/.rvm/gems/ruby-2.0.0-p247 with gemset hotel

~$ gem list

*** LOCAL GEMS ***

actionmailer (4.0.0)
actionpack (4.0.0)
activemodel (4.0.0)
activerecord (4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.0)
arel (4.0.0)
atomic (1.1.14)
builder (3.1.4)
bundler (1.3.5)
coffee-rails (4.0.0)
coffee-script (2.2.0)
coffee-script-source (1.6.3)
erubis (2.7.0)
execjs (2.0.1)
hike (1.2.3)
i18n (0.6.5)
jbuilder (1.5.1)
mail (2.5.4)
mime-types (1.25)
minitest (4.7.5)
multi_json (1.8.0)
polyglot (0.3.3)
rack (1.5.2)
rack-test (0.6.2)
rails (4.0.0)
railties (4.0.0)
rake (10.1.0)
rubygems-update (2.1.1)
rvm (1.11.3.8)
sprockets (2.10.0)
sprockets-rails (2.0.0)
thor (0.18.1)
thread_safe (0.1.3)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (0.3.37)

~$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [i686-linux]
~$ rails -v
Rails 4.0.0
~$ gem -v
2.1.1

但是当我尝试安装时

jquery-rails

作为

~$ sudo gem install jquery-rails

错误显示为

ERROR:  Error installing jquery-rails:
    activesupport requires Ruby version >= 1.9.3.

请任何人帮我安装带有最新更新环境的 jquery-rails gem。

gem 也指向当前的 rvm

$ which gem
/home/circar/.rvm/rubies/ruby-2.0.0-p247/bin/gem

我用谷歌搜索了它,但我不知道为什么我会在这个地方绊倒?如各处所述,我在我的过程中找不到任何问题。

高度赞赏任何帮助。 提前致谢。

【问题讨论】:

    标签: ruby-on-rails-4 ruby-2.0 activesupport


    【解决方案1】:

    sudo gem install jquery-rails 可能正在使用您系统的内置 Ruby(可能是 1.8 或 1.9.2)。这是因为您使用的是sudo

    使用 RVM,去掉 sudo,它将使用 RVM:

    gem install jquery-rails
    

    【讨论】:

    • 我的系统 gem 版本目前更新到 2.1.1。此外,cmd gem install jquery-rails 也显示相同的错误
    • RubyGems 版本与 Ruby 版本不同(没有 Ruby 2.1.1)。可能是gem 也没有使用 RVM 的 ruby​​(which gem 可能指向 /usr/bin/gem 而不是使用 RVM)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-08
    • 1970-01-01
    • 2017-04-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多