当我运行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中指定。我尝试过'捆绑更新'以及删除Gemfile.lock并运行'bundle install'。我也尝试在我的Rails gemfile中指定特定版本的ActiveSupport,但这已经无处可去了。
我真的很想使用最新的Rails,但是我无法使用控制台似乎非常糟糕。
FIY:我在Linux中使用Ruby 2.1.2p95和RVM。
编辑:我卸载了所有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
EDIT3:这是我的.irbrc文件:
# This loads some niceties for irb, courtesy of rvm.
# It also loads your custom ~/.irbrc if it exists.
# If you want to customize the irbrc for ONLY this version of
# ruby then edit this file. It will only be deleted if you do
# an "rvm install" over this ruby version.
if ENV["rvm_path"].nil?
require File.join(ENV["HOME"], "irbrc")
else
require File.join(ENV["rvm_path"], "scripts", "irbrc")
end
答案 0 :(得分:16)
Spring还在运行并且干扰。在shell中运行以下操作可以解决问题:
spring stop
现在Rails控制台可以正常工作。