gpt4 book ai didi

ruby-on-rails - Rails 控制台找不到 activesupport-4.1.2,即使它已安装

转载 作者:太空宇宙 更新时间:2023-11-03 17:00:15 25 4
gpt4 key购买 nike

当我运行 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 更新”以及删除 Gemfile.lock 和运行“bundle 安装”。我还尝试在我的 Rails gemfile 中指定特定版本的 ActiveSupport,但这让我无处可去。

我真的很想使用最新的 Rails,但我不能使用控制台,这似乎很糟糕。

请注意:我在 Linux 中使用 Ruby 2.1.2p95 和 RVM。

编辑:我卸载了所有 activesupport gem 并重新安装了 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

最佳答案

Spring 仍在运行和干扰。在 shell 中运行以下命令就可以了:

spring stop

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

关于ruby-on-rails - Rails 控制台找不到 activesupport-4.1.2,即使它已安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24495295/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com