ruby-on-rails – rails error method_missing’:未定义的方法`this’用于Gem :: Specification

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – rails error method_missing’:未定义的方法`this’用于Gem :: Specification前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我按照本教程:
https://guides.spreecommerce.com/developer/getting_started_tutorial.html#installing-image-magick
当我写作
  1. jonstark@jonstark-pc:~/rails_projects/optima1$spree install --auto-accept

我懂了:

  1. /home/jonstark/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:2158:in
  2. `method_missing': undefined method `this' for
  3. #<Gem::Specification:0x4db6d12 activesupport-4.2.0> (NoMethodError) from
  4. /home/jonstark/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:1057:in
  5. `find_active_stub_by_path' from
  6. /home/jonstark/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:64:in
  7. `require' from
  8. /home/jonstark/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/core_ext/string.rb:1:in
  9. `<top (required)>' from
  10. /home/jonstark/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in
  11. `require' from
  12. /home/jonstark/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in
  13. `rescue in require' from
  14. /home/jonstark/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in
  15. `require' from
  16. /home/jonstark/.rvm/gems/ruby-2.3.0/gems/spree_cmd-3.0.6.1/lib/spree_cmd/installer.rb:2:in
  17. `<top (required)>' from
  18. /home/jonstark/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
  19. `require' from
  20. /home/jonstark/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
  21. `require' from
  22. /home/jonstark/.rvm/gems/ruby-2.3.0/gems/spree_cmd-3.0.6.1/lib/spree_cmd.rb:13:in
  23. `<top (required)>' from
  24. /home/jonstark/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
  25. `require' from
  26. /home/jonstark/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
  27. `require' from
  28. /home/jonstark/.rvm/gems/ruby-2.3.0/gems/spree_cmd-3.0.6.1/bin/spree:2:in
  29. `<top (required)>' from
  30. /home/jonstark/.rvm/gems/ruby-2.3.0/bin/spree:23:in `load' from
  31. /home/jonstark/.rvm/gems/ruby-2.3.0/bin/spree:23:in `<main>' from
  32. /home/jonstark/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in
  33. `eval' from
  34. /home/jonstark/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in
  35. `<main>'

我的宝石文件

  1. source 'https://rubygems.org'
  2. ruby '2.3.0'
  3. #ruby-gemset=railstutorial_rails_4_0
  4.  
  5. gem 'rails','4.2'
  6. gem 'bootstrap-sass'
  7. gem 'sprockets'
  8. gem 'bcrypt-ruby'
  9. gem 'faker'
  10. gem 'will_paginate'
  11. gem 'bootstrap-will_paginate'
  12. gem 'ffaker'
  13. gem 'carrierwave','~> 0.9'
  14. gem "font-awesome-rails"
  15. gem 'sprockets-rails'
  16. gem 'rest-client'
  17. gem 'blogo'
  18. gem 'fog'
  19. gem 'carrierwave-aws'
  20. gem "figaro"
  21.  
  22. group :development,:test do
  23. gem 'sqlite3'
  24. gem 'rspec-rails'
  25. end
  26.  
  27. group :test do
  28. gem 'selenium-webdriver'
  29. gem 'capybara'
  30. gem 'factory_girl_rails'
  31.  
  32. end
  33.  
  34.  
  35. gem 'sass-rails'
  36. gem 'uglifier'
  37. gem 'coffee-rails'
  38. gem 'jquery-rails'
  39. gem 'turbolinks'
  40. gem 'jbuilder'
  41.  
  42. group :doc do
  43. gem 'sdoc','0.3.20',require: false
  44. end
  45.  
  46. group :production do
  47. gem 'pg'
  48. gem 'rails_12factor'
  49. gem 'heroku-deflater'
  50. # gem 'unicorn'
  51. end

更新:
我在https://github.com/spree/spree/issues/7104创建了一个github问题
他们把我联系到这里
https://github.com/rubygems/rubygems/issues/1420

但我仍然不知道如何解决我的问题

解决方法

gem update –system 2.4.8 –no-ri –no-rdoc – 修复它
细节在这里
https://github.com/remomueller/documentation/issues/7

猜你在找的Ruby相关文章