2016-09-23 10 views
0

以前はRails4を使用していましたが、すべてをRails5に更新しました。それ以来、私は宝石を手に入れています:新しいレールプロジェクトを作るたびにloaderrorGem:新しいRailsプロジェクトが作成されたときのloaderror

I rails new sampletestと入力してください。

プロジェクトが自動的に宝石をインストールした後、私はそれがあるとき、私はgemfileに「春」を置くべきと言っている理由

Bundle complete! 15 Gemfile dependencies, 54 gems now installed. 
Gems in the groups development and test were not installed. 
Use `bundle show [gemname]` to see where a bundled gem is installed. 
     run bundle exec spring binstub --all 
/Users/(folder)/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/rubygems_integration.rb:322:in `block in replace_gem': spring is not part of the bundle. Add it to Gemfile. (Gem::LoadError) 
    from /Users/(folder)/.rvm/gems/ruby-2.3.0/bin/spring:22:in `<main>' 
    from /Users/(folder)/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval' 
    from /Users/(folder)/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>' 

は、私はよく分からない、というエラーを取得します。

+0

グループの開発とテストの宝石はインストールされていないと言われています。開発グループには通常「春」が追加されています。 'bundle install'を実行してインストールしてください。 – Aleksey

+0

' bundle install'を再実行しても、 'Group development and testのGemsはインストールされていません。なぜでしょうか? – JoHksi

+0

'bundle config'を実行して出力を投稿できますか? – Aleksey

答えて

1

あなたはbundler configに問題があるようです。
bundle configを実行して、その外観を確認できます。

それあなたの場合あなたはあなたがグローバル設定を

$ bundle config 
Settings are listed in order of priority. The top value will be used. 
without 
Set for the current user (/Users/(folder_name)/.bundle/config): "development test" 
... 

を持っています。
文を削除して/Users/(folder_name)/.bundle/configを編集する必要があります。
bundle config --delete withoutを実行すると実行できます。

bundle configをもう一度実行してください。あなたは

Set for your local app (/home/aleksey/projects/mercury/.bundle/config): "development test" 
... 

だからあなたも地元without設定が表示さあなたの特定のケースで

bundle config --delete withoutをもう一度実行して削除します。

これで、bundle installを実行する準備が整いました。今回はすべての宝石をインストールする必要があります。

関連する問題