簡體   English   中英

Ruby on Rails: LoadError: cannot load such file — paypal-express

[英]Ruby on Rails: LoadError: cannot load such file — paypal-express

當我做

rake db:migrate

它只是失敗了。 這是日志:

$ rake db:migrate
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/object/duplicable.rb:82: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
rake aborted!
SystemStackError: stack level too deep
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rest-client-2.0.2/lib/restclient/version.rb:3:in `map'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rest-client-2.0.2/lib/restclient/version.rb:3:in `<module:RestClient>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rest-client-2.0.2/lib/restclient/version.rb:1:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rest-client-2.0.2/lib/restclient.rb:7:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rest-client-2.0.2/lib/rest_client.rb:2:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/paypal-express-0.8.1/lib/paypal.rb:6:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/paypal-express-0.8.1/lib/paypal/express.rb:1:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bundler-1.17.3/lib/bundler/runtime.rb:95:in `require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bundler-1.17.3/lib/bundler/runtime.rb:95:in `rescue in block in require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bundler-1.17.3/lib/bundler/runtime.rb:72:in `block in require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `each'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bundler-1.17.3/lib/bundler.rb:114:in `require'
/home/ubuntu/myproject/RubyOnRails/config/application.rb:7:in `<top (required)>'
/home/ubuntu/myproject/RubyOnRails/Rakefile:4:in `require'
/home/ubuntu/myproject/RubyOnRails/Rakefile:4:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
/home/ubuntu/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'

Caused by:
LoadError: cannot load such file -- paypal-express
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `each'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `block in require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `each'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `require'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bundler-1.17.3/lib/bundler.rb:114:in `require'
/home/ubuntu/myproject/RubyOnRails/config/application.rb:7:in `<top (required)>'
/home/ubuntu/myproject/RubyOnRails/Rakefile:4:in `require'
/home/ubuntu/myproject/RubyOnRails/Rakefile:4:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
/home/ubuntu/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'
(See full trace by running task with --trace)

我嘗試了這個答案中給出的建議:

  1. 我的 Gemfile 中已經有了 gem 'paypal-express'
  2. 我手動安裝了paypal-express gem:

    寶石安裝貝寶快遞

仍然沒有運氣。 這個問題的提問者給出了以下線索:

我需要從終端創建 model 以便我可以運行我的遷移

但我不知道該怎么做(如果我想嘗試的話)。 任何幫助將非常感激。 我是 RoR 的新手。

我意識到這個問題的根本原因是我忘記了導入數據庫(換句話說,我的數據庫是空的)。 我知道這是一個愚蠢的錯誤,我仍然將它發布在這里,以防它可以幫助將來來這里的人。 我通過這樣做導入了數據庫:

sudo mysql -u root -p <db name> < /home/ubuntu/my_site_data.sql

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM