gpt4 book ai didi

ruby-on-rails-3 - 为 nil :NilClass rake 未定义的方法 `gsub'

转载 作者:行者123 更新时间:2023-12-04 06:55:01 25 4
gpt4 key购买 nike

我希望有人能在这里说几句鼓励的话和一点建议。

我正在使用 Ruby v1.9.2 p290

我一直在设置一个新的生产服务器,但我在尝试让新环境正常工作时遇到了麻烦。一切都已安装,现在我正在尝试运行 rake,但它给了我一个错误,我无法理解也找不到任何 Internet 帮助。

deploy@ip-10-99-66-30:~/pm$ rake -v --trace
rake aborted!
undefined method `gsub' for nil:NilClass
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:77:in `rescue in rescue in block in require'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:72:in `rescue in block in require'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:62:in `block in require'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `require'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler.rb:119:in `require'
/home/deploy/pm/config/application.rb:14:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/home/deploy/pm/Rakefile:5:in `<top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:78:in `block in load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:61:in `block in run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19:in `<main>'

这是我的 gem list

actionmailer (3.1.0)
actionpack (3.1.0)
activemodel (3.1.0)
activerecord (3.1.0)
activeresource (3.1.0)
activesupport (3.1.0)
archive-tar-minitar (0.5.2)
arel (2.2.3)
bcrypt-ruby (3.0.1)
builder (3.0.0)
bundler (1.1.4)
cancan (1.6.8)
capybara (1.1.2)
childprocess (0.3.3)
client_side_validations (3.1.4)
cocaine (0.2.1)
coffee-rails (3.1.1)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
columnize (0.3.6)
cucumber (1.2.1)
cucumber-rails (1.3.0)
daemon_controller (1.0.0)
database_cleaner (0.8.0)
devise (1.5.3)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.4.0)
factory_girl (3.5.0)
factory_girl_rails (3.5.0)
faker (1.0.1)
fastthread (1.0.7)
ffi (1.0.11)
geocoder (1.1.2)
gherkin (2.11.1)
guard (1.2.3)
guard-rspec (1.2.0)
haml (3.1.6)
haml-rails (0.3.4)
hike (1.2.1)
hpricot (0.8.6)
httparty (0.8.3)
i18n (0.6.0)
journey (1.0.4)
jquery-rails (1.0.19)
json (1.7.3)
json_pure (1.7.3)
jsonify (0.3.1)
jsonify-rails (0.3.2)
libv8 (3.3.10.4 x86_64-linux)
linecache19 (0.5.12)
listen (0.4.7)
mail (2.3.3)
meta_search (1.1.3)
mime-types (1.19)
minitest (1.6.0)
multi_json (1.3.6)
multi_xml (0.5.1)
mysql2 (0.3.11)
nokogiri (1.5.5)
orm_adapter (0.0.7)
paperclip (2.7.0)
passenger (3.0.17)
polyamorous (0.5.0)
polyglot (0.3.3)
rack (1.3.6)
rack-cache (1.0.3)
rack-mount (0.8.3)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.1.0)
rails3-jquery-autocomplete (1.0.7)
railties (3.1.0)
rake (0.9.2)
rb-fchange (0.0.5)
rb-fsevent (0.9.1)
rb-inotify (0.8.8)
rdoc (3.12, 2.5.8)
remotipart (1.0.2)
rspec (2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.3)
rspec-mocks (2.11.2)
rspec-rails (2.11.0)
ruby-debug-base19 (0.11.25)
ruby-debug19 (0.11.6)
ruby_core_source (0.1.5)
ruby_parser (2.3.1)
rubyzip (0.9.9)
sass (3.1.20)
sass-rails (3.1.4)
selenium-webdriver (2.7.0)
sexp_processor (3.2.0)
simple_datatables (0.2.1)
sprockets (2.0.4)
therubyracer (0.10.1)
thor (0.14.6)
tilt (1.3.3)
timeliness (0.3.6)
treetop (1.4.10)
tzinfo (0.3.33)
uglifier (1.2.6)
validates_timeliness (3.0.12)
warden (1.2.1)
web-app-theme (0.8.0)
webrat (0.7.3)
will_paginate (3.0.3)
xpath (0.1.4)

我已经在这上面花了几天时间,在拔完所有头发后,我头上的头发已经不多了。

有什么建议吗? Ruby on Rails 是一个出色的工作平台,但我对这个平台感到困惑。

最佳答案

通过执行以下操作将 bundler gem 更新到最新版本(回答时为 1.2.3):

gem update bundler

为我解决了这个问题。好吧,它并没有完全修复它,但它允许显示导致问题的实际错误消息。

关于ruby-on-rails-3 - 为 nil :NilClass rake 未定义的方法 `gsub',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12355632/

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