2017-07-10 7 views
1

レール5.0から5.1への更新を試みたとき、私は動作するアプリケーションを持っていました。初期化されていない定数Faker :: Dateレールへの更新5.1

(私は4.2から5.0に更新されました)それは次のようにコマンドを実行し、それをもう動作しません。

rails server 

がエラーを生成します。私はこれをどのように修正するのか分かりませんし、情報を見つけることができませんでした。それは詐欺師のコードを指しているので奇妙です。

これは、コンソール出力

/home/gaston/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.7/lib/bundler/runtime.rb:94:inです rescue in block (2 levels) in require': There was an error while trying to load the gem 'faker'. (Bundler::GemRequireError) Gem Load Error is: uninitialized constant Faker::Date Backtrace for gem load error is: /home/gaston/.rvm/gems/ruby-2.3.1/gems/faker-1.8.1/lib/faker/time.rb:2:in /ホーム/ガストン/ 'で <top (required)>' /home/gaston/.rvm/gems/ruby-2.3.1/gems/faker-1.8.1/lib/faker.rb:214:in /home/gaston/.rvm/gems/ruby-2.3.1/gems/faker-1.8.1/lib/faker/time.rb:1:inブロック' .rvm/gems/ruby​​-2.3.1/gems/faker-1.8.1/lib/faker.rb:214:in each' /home/gaston/.rvm/gems/ruby-2.3.1/gems/faker-1.8.1/lib/faker.rb:214:in ' /home/gaston/.rvm/gems/ruby-2.3.1/gems/ bundler-1.13.7/lib/bundler/runtime.rb:91: require' /home/gaston/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in ブロック(2 /ホーム「必要に each' /home/gaston/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in /home/gaston/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:inブロック」を必要と中レベル) /gaston/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in each' /home/gaston/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in 「 /home/gaston/.rvm/gems/ruby- 2.3.1/gems/bundler-1.13.7/lib/bundler.rb:106: require' /home/gaston/Workspace/cloud9workspace/projects/time/config/application.rb:7:in ' /home/gaston/.rvm/gems/ruby-2.3.1/gems/railties-5.1.0/lib /rails/commands/server/server_command.rb:128:in require' /home/gaston/.rvm/gems/ruby-2.3.1/gems/railties-5.1.0/lib/rails/commands/server/server_command.rb:128:in ブロック実行中 ' /home/gaston/.rvm/gems/ruby-2.3.1/gems/railties-5.1.0/lib/rails/commands /server/server_command.rb:125:in tap' /home/gaston/.rvm/gems/ruby-2.3.1/gems/railties-5.1.0/lib/rails/commands/server/server_command.rb:125:in perform ' /home/gaston/.rvm/gems/ruby-2.3.1/gems/thor-0.19.4/lib/thor/command.rb:27:in run' /home/gaston/.rvm/gems/ruby-2.3.1/gems/thor-0.19.4/lib/thor/invocation.rb:126:in invoke_command ' /home/gaston/.rvm/gems /ruby-2.3.1/gems/thor-0.19.4/lib/thor.rb:369:in dispatch' /home/gaston/.rvm/gems/ruby-2.3.1/gems/railties-5.1.0/lib/rails/command/base.rb:63:in perform ' /home/gaston/.rvm/gems/ruby-2.3.1/gems/railties-5.1 0.0/libに/レール/ command.rb:44: invoke' /home/gaston/.rvm/gems/ruby-2.3.1/gems/railties-5.1.0/lib/rails/commands.rb:16:in の ' /ホーム/ガストン/ワークスペース/ cloud9workspace /プロジェクト/時間/ binに/レール:9: require' /home/gaston/Workspace/cloud9workspace/projects/time/bin/rails:9:in の' /home/gaston/.rvm/ gems/ruby​​-2.3.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28: load' /home/gaston/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in ' /home/gaston/.rvm/gems/ruby-2.3.1/ gems/spring-2.0.2/lib/spring/client/command.rb:7:i nは call' /home/gaston/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/client.rb:30:in 実行 ' <top (required)>' /home/gaston/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in /home/gaston/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/bin/spring:49:in負荷' /home/gaston/.rvm/ gems/ruby​​-2.3.1/gems/spring-2.0.2/lib/spring/binstub.rb:31: <top (required)>' /home/gaston/Workspace/cloud9workspace/projects/time/bin/spring:13:in は、 ' /home/gaston/Workspace/cloud9workspace/projects/time/bin/spring:13が必要です。 :in <top (required)>' bin/rails:3:inロード 'bin/rails:3:<main>' Bundler Error Backtrace: from /home/gaston/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.7/lib/bundler/runtime.rb:90:in ブロック内(2レベル)' from /home/gaston/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.7/lib/ bundler/runtime.rb:86: each' from /home/gaston/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in ブロックが必要 ' from /home/gaston/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.7/lib/bundler/runtime.rb:75 : each' from /home/gaston/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in /home/gaston/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.7/lib/bundlerの ' が必要です。rb:106: require' from /home/gaston/Workspace/cloud9workspace/projects/time/config/application.rb:7:in ' /home/gaston/.rvm/gems/ruby-2.3.1/gems/railties-5.1.0/lib/rails/commands/server/server_command.rb:128:in require' from /home/gaston/.rvm/gems/ruby-2.3.1/gems/railties-5.1.0/lib/rails/commands/server/server_command.rb:128:in ブロック実行中 ' /home/gaston/.rvm/gems/ruby-2.3.1/gems/railties-5.1.0/lib/rails/commands/server/server_command.rb:125:inから tap' from /home/gaston/.rvm/gems/ruby-2.3.1/gems/railties-5.1.0/lib/rails/commands/server/server_command.rb:125:in から実行' from /home/gaston/.rvm/gems/ruby-2.3.1/gems/thor-0.19.4/lib/thor/command.rb:27:in run' from /home/gaston/.rvm/gems/ruby-2.3.1/gems/thor-0.19.4/lib/thor/invocation.rb:126:in invoke_command ' from /home/gaston/.rvm /gems/ruby-2.3.1/gems/thor-0.19.4/lib/thor.rb:369:in dispatch' from /home/gaston/.rvm/gems/ruby-2.3.1/gems/railties-5.1.0/lib/rails/command/base.rb:63:in perform ' /home/gaston/.rvm/gems/ruby-2.3.1/gems/からrailties-5.1.0/lib/rails/command.rb:44 : invoke' from /home/gaston/.rvm/gems/ruby-2.3.1/gems/railties-5.1.0/lib/rails/commands.rb:16:in の ' ホーム/ガストン/ワークスペース/ cloud9workspace /プロジェクト/時間/ binに/レール/から:9: require' from /home/gaston/Workspace/cloud9workspace/projects/time/bin/rails:9:in で' /home/gaston/.rvm/gems/ruby-2.3.1/gems/からspring-2.0.2/lib/spring/client/rails.rb:28: load' from /home/gaston/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in /home/gaston/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/libから ' を呼び出します。 /spring/client/command.rb:7:in call' from /home/gaston/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/client.rb:30:in run ' /home/gaston/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/bin/spring:49:in <top (required)>' from /home/gaston/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in ロード ' /home/gaston/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in <top (required)>' from /home/gaston/Workspace/cloud9workspace/projects/time/bin/spring:13:in から'が必要ですから/ホーム/ガストン/ワークスペース/ cloud9workspace /プロジェクト/時間/ binに/春:13: <top (required)>' from bin/rails:3:in負荷の

':3ビン/レールから `に' これは私のファイルは、次のとおりです。 春.rb

#!/usr/bin/env ruby 

# This file loads spring without using Bundler, in order to be fast. 
# It gets overwritten when you run the `spring binstub` command. 

unless defined?(Spring) 
    require 'rubygems' 
    require 'bundler' 

    if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)) 
    Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) } 
    gem 'spring', match[1] 
    require 'spring/binstub' 
    end 
end 

Fakerはすでにgemfileに含まれていました。私は最後のバージョンに更新しました。更新中 gemfile

gem 'faker', '~> 1.8', '>= 1.8.1' 

これは私のapplication.rbで、(最初の7行) application.rb

require File.expand_path('../boot', __FILE__) 

require 'rails/all' 

# Require the gems listed in Gemfile, including any gems 
# you've limited to :test, :development, or :production. 
Bundler.require(*Rails.groups) 
... 

答えて

1

問題が発生しました。私はこのプロセスを一からやってきましたが、今はうまくいきます。それは泥棒とは関係がありませんでした。

関連する問題