2017-05-02 39 views
9

Właśnie utworzyłem nowe pole Vagrant, aby móc rozwijać moją aplikację Rails. Pudełko jest fabrycznie nowe i ma zainstalowane Ruby, MySQL itp.Możliwy problem z kolcami zębatymi?

mam zainstalowane wszystkie kamienie itp ale gdy próbuję uruchomić aplikację, pojawia się następujący:

[email protected]:/vagrant/source$ bundle exec foreman start 
17:45:02 rails.1 | started with pid 5910 
17:45:05 rails.1 | /home/vagrant/.gem/ruby/2.2.7/gems/sprockets-rails-3.2.0/lib/sprockets/railtie.rb:108:in `block in <class:Railtie>': undefined method `+' for false:FalseClass (NoMethodError) 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/initializable.rb:30:in `instance_exec' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/initializable.rb:30:in `run' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/initializable.rb:55:in `block in run_initializers' 
17:45:05 rails.1 | from /opt/rubies/ruby-2.2.7/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each' 
17:45:05 rails.1 | from /opt/rubies/ruby-2.2.7/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component' 
17:45:05 rails.1 | from /opt/rubies/ruby-2.2.7/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from' 
17:45:05 rails.1 | from /opt/rubies/ruby-2.2.7/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component' 
17:45:05 rails.1 | from /opt/rubies/ruby-2.2.7/lib/ruby/2.2.0/tsort.rb:345:in `each' 
17:45:05 rails.1 | from /opt/rubies/ruby-2.2.7/lib/ruby/2.2.0/tsort.rb:345:in `call' 
17:45:05 rails.1 | from /opt/rubies/ruby-2.2.7/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component' 
17:45:05 rails.1 | from /opt/rubies/ruby-2.2.7/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each' 
17:45:05 rails.1 | from /opt/rubies/ruby-2.2.7/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/initializable.rb:54:in `run_initializers' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/application.rb:352:in `initialize!' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/railtie.rb:194:in `public_send' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/railtie.rb:194:in `method_missing' 
17:45:05 rails.1 | from /vagrant/source/config/environment.rb:5:in `<top (required)>' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `block in require' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require' 
17:45:05 rails.1 | from /vagrant/source/config.ru:3:in `block in <main>' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/rack-1.6.5/lib/rack/builder.rb:55:in `instance_eval' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/rack-1.6.5/lib/rack/builder.rb:55:in `initialize' 
17:45:05 rails.1 | from /vagrant/source/config.ru:in `new' 
17:45:05 rails.1 | from /vagrant/source/config.ru:in `<main>' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/rack-1.6.5/lib/rack/builder.rb:49:in `eval' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/rack-1.6.5/lib/rack/builder.rb:49:in `new_from_string' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/rack-1.6.5/lib/rack/builder.rb:40:in `parse_file' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/rack-1.6.5/lib/rack/server.rb:299:in `build_app_and_options_from_config' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/rack-1.6.5/lib/rack/server.rb:208:in `app' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/commands/server.rb:61:in `app' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/rack-1.6.5/lib/rack/server.rb:336:in `wrapped_app' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/commands/server.rb:139:in `log_to_stdout' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/commands/server.rb:78:in `start' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:80:in `block in server' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `tap' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `server' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!' 
17:45:05 rails.1 | from /home/vagrant/.gem/ruby/2.2.7/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>' 
17:45:05 rails.1 | from bin/rails:4:in `require' 
17:45:05 rails.1 | from bin/rails:4:in `<main>' 
17:45:05 rails.1 | => Booting Puma 
17:45:05 rails.1 | => Rails 4.2.5.1 application starting in development on http://0.0.0.0:3000 
17:45:05 rails.1 | => Run `rails server -h` for more startup options 
17:45:05 rails.1 | => Ctrl-C to shutdown server 
17:45:05 rails.1 | Exiting 
17:45:05 rails.1 | exited with code 1 
17:45:05 system | sending SIGTERM to all processes 

Szukałem, ale nie może wydawać się, aby dowiedzieć się, co jest przyczyną tego.

Ktoś może wskazać mi właściwy kierunek?

+0

Co tu '/vagrant/source/config/environment.rb: 5'? – Uzbekjon

+0

@Uzbekjon Ta linia to: MyAppName :: Application.initialize! – rctneil

+0

@Zzbekjon Masz więcej pomysłów na ten temat? Bardzo mnie to denerwuje. – rctneil

Odpowiedz

2

Wyjątkiem jest wyrzucane na this line, więc myślę, że masz następujące gdzieś w plikach konfiguracyjnych:

config.assets.precompile = false 

To ustawienie konfiguracja powinna określać tablicę aktywów, które mają zostać skompilowane, to nie powinno być ustawione na false. Zobacz Rails guides, aby uzyskać więcej informacji.

Aby przetestować tę hipotezę, że skonfigurowano Rails Test 5 projektu z powyższej linii i dostał ten sam wyjątek:

.../gems/sprockets-rails-3.2.0/lib/sprockets/railtie.rb:108:in `block in <class:Railtie>': undefined method `+' for false:FalseClass (NoMethodError) 
+0

Fantastyczne! Dziękuję Ci. Czy możesz mi powiedzieć, w jaki sposób dowiedziałeś się, że przyczyną problemu był ten wiersz? – rctneil

+1

Znajduje się w pierwszym wierszu śledzenia stosu, który umieścisz w pytaniu. Jest napisane ".../sprocket-rails-3.2.0 /.../ railtie: 108'. Wyszukałem więc źródło klejnotów prowadnic zębatych i znalazłem linię. Stamtąd problem był dość oczywisty. – BoraMa