estimatemyproject.com is running on ruby on rails for more than 2 years without any problems. But just today it stopped loading assets . I searched online and tried
rake assets:precompile --trace RAILS_ENV=production
but it fails:
root@emp:/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
Help me to debug this please! Need the assets to reload or refresh the cache somehow.
Thanks!
I tried using the change diego suggested :
It gives me a different error now.
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/lib/ruby/vendor_ruby/rake/application.rb:63:in `run' /usr/bin/rake:27
You have a syntax error in config/application.rb
line 7.
Seems like you're using an old version of Ruby that does not support the colon hash syntax. Change this:
Bundler.require(*Rails.groups(assets: %w(development test)))
to:
Bundler.require(*Rails.groups(:assets => %w(development test)))
Fix that and redeploy your app and rerun the rake command.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.