Ruby on rails 即使安装了activesupport-4.1.2,Rails控制台也找不到它

Ruby on rails 即使安装了activesupport-4.1.2,Rails控制台也找不到它,ruby-on-rails,ruby,gem,bundler,activesupport,Ruby On Rails,Ruby,Gem,Bundler,Activesupport,当我运行Rails 4.1.2服务器时,没有出现错误 但是,如果运行“rails c”,则会出现以下错误: Could not find activesupport-4.1.2 in any of the sources Run `bundle install` to install missing gems. 奇怪的是,activesupport-4.1.2既已安装,又在Gemfile.lock中指定。我尝试了“bundle update”以及删除Gemfile.lock并运行“bundle

当我运行Rails 4.1.2服务器时,没有出现错误

但是,如果运行“rails c”,则会出现以下错误:

Could not find activesupport-4.1.2 in any of the sources
Run `bundle install` to install missing gems.
奇怪的是,activesupport-4.1.2既已安装,又在Gemfile.lock中指定。我尝试了“bundle update”以及删除Gemfile.lock并运行“bundle install”。我还尝试在我的Rails文件中指定特定版本的ActiveSupport,但这并没有让我满意

我真的很想使用最新的Rails,但是我不能使用控制台,这看起来很糟糕

菲伊:我在Linux和RVM中使用Ruby 2.1.2p95

编辑:我卸载了所有activesupport gems并重新安装了4.1.2。下面是“gem list activesupport”所说的:

*** LOCAL GEMS ***

activesupport (4.1.2)
同样的问题

EDIT2:这是我的Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.1.2)
      actionpack (= 4.1.2)
      actionview (= 4.1.2)
      mail (~> 2.5.4)
    actionpack (4.1.2)
      actionview (= 4.1.2)
      activesupport (= 4.1.2)
      rack (~> 1.5.2)
      rack-test (~> 0.6.2)
    actionview (4.1.2)
      activesupport (= 4.1.2)
      builder (~> 3.1)
      erubis (~> 2.7.0)
    activemodel (4.1.2)
      activesupport (= 4.1.2)
      builder (~> 3.1)
    activerecord (4.1.2)
      activemodel (= 4.1.2)
      activesupport (= 4.1.2)
      arel (~> 5.0.0)
    activesupport (4.1.2)
      i18n (~> 0.6, >= 0.6.9)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.1)
      tzinfo (~> 1.1)
    akami (1.2.2)
      gyoku (>= 0.4.0)
      nokogiri
    arel (5.0.1.20140414130214)
    builder (3.2.2)
    capybara (2.3.0)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (~> 2.0)
    coffee-rails (4.0.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.7.0)
    database_cleaner (1.3.0)
    diff-lcs (1.2.5)
    erubis (2.7.0)
    execjs (2.2.1)
    gyoku (1.1.1)
      builder (>= 2.1.2)
    hike (1.2.3)
    httpi (2.1.0)
      rack
      rubyntlm (~> 0.3.2)
    i18n (0.6.9)
    jbuilder (2.1.1)
      activesupport (>= 3.0.0, < 5)
      multi_json (~> 1.2)
    jquery-rails (3.1.1)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    json (1.8.1)
    kgio (2.9.2)
    libv8 (3.16.14.3)
    macaddr (1.7.1)
      systemu (~> 2.6.2)
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.25.1)
    mini_portile (0.6.0)
    minitest (5.3.5)
    multi_json (1.10.1)
    mysql2 (0.3.16)
    nokogiri (1.6.2.1)
      mini_portile (= 0.6.0)
    nori (2.4.0)
    polyglot (0.3.5)
    rack (1.5.2)
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (4.1.2)
      actionmailer (= 4.1.2)
      actionpack (= 4.1.2)
      actionview (= 4.1.2)
      activemodel (= 4.1.2)
      activerecord (= 4.1.2)
      activesupport (= 4.1.2)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.1.2)
      sprockets-rails (~> 2.0)
    railties (4.1.2)
      actionpack (= 4.1.2)
      activesupport (= 4.1.2)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    raindrops (0.13.0)
    rake (10.3.2)
    rdoc (4.1.1)
      json (~> 1.4)
    ref (1.0.5)
    rspec-core (3.0.2)
      rspec-support (~> 3.0.0)
    rspec-expectations (3.0.2)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.0.0)
    rspec-mocks (3.0.2)
      rspec-support (~> 3.0.0)
    rspec-rails (3.0.1)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec-core (~> 3.0.0)
      rspec-expectations (~> 3.0.0)
      rspec-mocks (~> 3.0.0)
      rspec-support (~> 3.0.0)
    rspec-support (3.0.2)
    rubyntlm (0.3.4)
    sass (3.2.19)
    sass-rails (4.0.3)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.2.0)
      sprockets (~> 2.8, <= 2.11.0)
      sprockets-rails (~> 2.0)
    savon (2.5.1)
      akami (~> 1.2.0)
      builder (>= 2.1.2)
      gyoku (~> 1.1.0)
      httpi (~> 2.1.0)
      nokogiri (>= 1.4.0)
      nori (~> 2.4.0)
      uuid (~> 2.3.7)
      wasabi (~> 3.3.0)
    sdoc (0.4.0)
      json (~> 1.8)
      rdoc (~> 4.0, < 5.0)
    simplecov (0.7.1)
      multi_json (~> 1.0)
      simplecov-html (~> 0.7.1)
    simplecov-html (0.7.1)
    spring (1.1.3)
    sprockets (2.11.0)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sprockets-rails (2.1.3)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (~> 2.8)
    sqlite3 (1.3.9)
    subactions (1.0.1)
    systemu (2.6.4)
    therubyracer (0.12.1)
      libv8 (~> 3.16.14.0)
      ref
    thor (0.19.1)
    thread_safe (0.3.4)
    tilt (1.4.1)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    turbolinks (2.2.2)
      coffee-rails
    tzinfo (1.2.1)
      thread_safe (~> 0.1)
    uglifier (2.5.1)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    unicorn (4.8.3)
      kgio (~> 2.6)
      rack
      raindrops (~> 0.7)
    unicorn-rails (2.1.1)
      rack
      unicorn
    uuid (2.3.7)
      macaddr (~> 1.0)
    version (1.0.0)
    wasabi (3.3.0)
      httpi (~> 2.0)
      mime-types (< 2.0.0)
      nokogiri (>= 1.4.0)
    xpath (2.0.0)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  capybara
  coffee-rails (~> 4.0.0)
  database_cleaner
  jbuilder (~> 2.0)
  jquery-rails
  mysql2
  rails (= 4.1.2)
  rspec-rails (~> 3.0.0)
  sass-rails (~> 4.0.3)
  sdoc (~> 0.4.0)
  simplecov (~> 0.7.1)
  simplecov-html
  spring
  sqlite3
  subactions
  therubyracer
  turbolinks
  uglifier (>= 1.3.0)
  unicorn
  unicorn-rails
  version

春天仍在流淌和干扰。在shell中运行以下命令可以实现此目的:

spring stop

现在Rails控制台可以正常工作了。

如果运行:
bundle exec Rails c
?或者
/script/rails c
?签出您的
Gemfile.lock
文件,请发布删除Gemfile.lock,然后进行捆绑安装
bundle exec rails c
没有区别。我已经删除了Gemfile.lock并安装了bundle(请阅读我的问题)。我将在我的问题中添加Gemfile.lock,以排除我不时遇到的
spring
干扰的可能性。运行
spring status
检查弹簧的状态。尝试使用
spring stop
然后
bundle
然后
rails c
停止它。为我修复了完全相同的问题。谢谢谢谢你刚刚把我从几个小时的困惑和痛苦中解救出来:)
spring stop