2016-09-02 14 views
0

estimatemyproject.comは、ruby on railで2年以上問題なく動作しています。 しかし、今日では、資産の読み込みが停止しました。 私はオンライン検索とRuby on Rails AppアセットがロードされないHTTP 404

rake assets:precompile --trace RAILS_ENV=production 

を試してみましたが、それは失敗します。

[email protected]:/home/emp/current# rake assets:precompile --trace RAILS_ENV=production 
rake aborted! 
/home/emp/emp/releases/20160127092918/config/application.rb:7: syntax error, unexpected ':', expecting ')' 
    Bundler.require(*Rails.groups(assets: %w(development test))) 
           ^
/home/emp/emp/releases/20160127092918/config/application.rb:7: syntax error, unexpected ')', expecting kEND 
    Bundler.require(*Rails.groups(assets: %w(development test))) 
                 ^
/home/emp/emp/releases/20160127092918/config/application.rb:60: syntax error, unexpected $end, expecting kEND 
/home/emp/emp/releases/20160127092918/Rakefile:5:in `require' 
/home/emp/emp/releases/20160127092918/Rakefile:5 
/usr/lib/ruby/vendor_ruby/rake/rake_module.rb:25:in `load' 
/usr/lib/ruby/vendor_ruby/rake/rake_module.rb:25:in `load_rakefile' 
/usr/lib/ruby/vendor_ruby/rake/application.rb:501:in `raw_load_rakefile' 
/usr/lib/ruby/vendor_ruby/rake/application.rb:82:in `load_rakefile' 
/usr/lib/ruby/vendor_ruby/rake/application.rb:133:in `standard_exception_handling' 
/usr/lib/ruby/vendor_ruby/rake/application.rb:81:in `load_rakefile' 
/usr/lib/ruby/vendor_ruby/rake/application.rb:65:in `run' 
/usr/lib/ruby/vendor_ruby/rake/application.rb:133:in `standard_exception_handling' 
/usr/lib/ruby/vendor_ruby/rake/application.rb:63:in `run' 
/usr/bin/rake:27 

これをしてくださいデバッグするために私を助けて! 何らかの方法でキャッシュをリロードまたはリフレッシュするには、アセットが必要です。

ありがとうございます!

私はサンディエゴの提案の変更を使用してみました:

それが今私に別のエラーが発生します。

rake aborted!

no such file to load -- rubygems 
/home/emp/emp/releases/20160127092918/config/boot.rb:1:in `require' 
/home/emp/emp/releases/20160127092918/config/boot.rb:1 
/home/emp/emp/releases/20160127092918/config/application.rb:1:in `require' 
/home/emp/emp/releases/20160127092918/config/application.rb:1 
/home/emp/emp/releases/20160127092918/Rakefile:5:in `require' 
/home/emp/emp/releases/20160127092918/Rakefile:5 
/usr/lib/ruby/vendor_ruby/rake/rake_module.rb:25:in `load' 
/usr/lib/ruby/vendor_ruby/rake/rake_module.rb:25:in `load_rakefile' 
/usr/lib/ruby/vendor_ruby/rake/application.rb:501:in `raw_load_rakefile' 
/usr/lib/ruby/vendor_ruby/rake/application.rb:82:in `load_rakefile' 
/usr/lib/ruby/vendor_ruby/rake/application.rb:133:in  `standard_exception_handling' 
/usr/lib/ruby/vendor_ruby/rake/application.rb:81:in `load_rakefile' 
/usr/lib/ruby/vendor_ruby/rake/application.rb:65:in `run' 
/usr/lib/ruby/vendor_ruby/rake/application.rb:133:in `standard_exception_handling' 

実行」 は/ usr/binに/熊手 `/usr/lib/ruby/vendor_ruby/rake/application.rb:63:in:27

答えて

0

あなたはconfig/application.rb 7行目に構文エラーがあります

コロンハッシュ構文をサポートしていない旧バージョンのRubyを使用しているようです。それを修正し、アプリを再デプロイし、すくいコマンドを再実行し

Bundler.require(*Rails.groups(:assets => %w(development test))) 

:に

Bundler.require(*Rails.groups(assets: %w(development test))) 

:これを変更します。

+0

私はこれを変更して、 "service thin restart"を使用してアプリケーションを再実行しましたが、今度はサーバーが起動しません。ウェブサイト上では「502 Bad Gateway」と表示されます。 Cantは今サーバを稼働させているようだ。 –

+0

誤字やその他の問題がある場合に備えて 'bundle'が動作することを確認してください。 – DiegoSalazar

関連する問題