2016-04-13 8 views
1

私はレールSを実行しようとしているが、私はこのエラーメッセージになっています:Railsのサーバー - 初期化されていない一定のスプロケット:: Railsの:: VERSION(NameError)

/home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bootstrap-sass-3.3.6/lib/bootstrap-sass/engine.rb:11:in `block in <class:Engine>': uninitialized constant Sprockets::Rails::VERSION (NameError) 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `instance_exec' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `run' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:55:in `block in run_initializers' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:180:in `each' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/initializable.rb:54:in `run_initializers' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/application.rb:215:in `initialize!' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/railtie/configurable.rb:30:in `method_missing' 
     from /vagrant/src/quotesgenerator/config/environment.rb:5:in `<top (required)>' 
     from /vagrant/src/quotesgenerator/config.ru:3:in `require' 
     from /vagrant/src/quotesgenerator/config.ru:3:in `block in <main>' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize' 
     from /vagrant/src/quotesgenerator/config.ru:in `new' 
     from /vagrant/src/quotesgenerator/config.ru:in `<main>' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `eval' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `new_from_string' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:40:in `parse_file' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/server.rb:277:in `build_app_and_options_from_config' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/server.rb:199:in `app' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/commands/server.rb:48:in `app' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/server.rb:314:in `wrapped_app' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/commands/server.rb:75:in `start' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:76:in `block in <top (required)>' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:71:in `tap' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:71:in `<top (required)>' 
     from bin/rails:4:in `require' 
     from bin/rails:4:in `<main>' 

を私は宝石 'スプロケット・レール' を追加、:この記事で説明したように=>「スプロケット/レール/バージョン」を必要とするが、それは問題を解決していない:レール・サーバを実行しているとき Cannot launch rails server - uninitialized constants Sprockets::Rails::VERSION::(NameError)

私は今、このエラーを取得しています:

/home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `require': cannot load such file -- sprockets/rails/version (LoadError) 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `each' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `block in require' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `each' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `require' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler.rb:131:in `require' 
     from /vagrant/src/quotesgenerator/config/application.rb:7:in `<top (required)>' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:74:in `require' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:74:in `block in <top (required)>' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:71:in `tap' 
     from /home/vagrant/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-4.0.1/lib/rails/commands.rb:71:in `<top (required)>' 
     from bin/rails:4:in `require' 
     from bin/rails:4:in `<main>' 

どのように私はこれを解決することができますアドバイス?

答えて

0

問題が解決しない場合は、直接スプロケットの宝石を使用してみてくださいgem 'sprockets-rails', :require => 'sprockets/railtie'

を使用してみてください:

gem 'sprockets'

関連する問題