1

I am working on Rails 4.2 & Angular 1.4.8 as the front-end. This is my development.rb file:

Rails.application.configure do
  config.cache_classes = false
  config.eager_load = false
  config.action_controller.perform_caching = false
  config.action_mailer.raise_delivery_errors = false
  config.active_support.deprecation = :log
  config.active_record.migration_error = :page_load
  config.assets.debug = true
  config.assets.raise_runtime_errors = true
  config.action_mailer.delivery_method = :letter_opener_web
  config.action_mailer.default_url_options = {host: "localhost:3000"}
  config.consider_all_requests_local = false
end

I know that by disabling assets.debug I can really speed this up, but I need to have my assets refreshed when I refresh the page. I am doing full stack so I can't precompile assets all the time.

I recently started using guard with guard-rails - do I have any chance ?

ftshtw
  • 629
  • 1
  • 5
  • 19
  • 1
    do you wish to speed up loading the app or what? – Малъ Скрылевъ Jan 27 '16 at 14:11
  • The process of reloading actually, after I make a change either on the backend or the front. It takes ~20-30 seconds to full refresh the whole page. I am using Vagrant with ubuntu server 14.04LTS on an SSD drive with 2GB of memory. The site runs very fast on production instead of development. – ftshtw Jan 27 '16 at 14:18

1 Answers1

1

I suspect that compiling all assets every time after file changed.

if you require angularjs libs and other libs in to application.js try to create a separate file for libraries and application

See also: Rails 3.1 is very slow in development-mode because of assets, what to do?

Community
  • 1
  • 1
Marat Amerov
  • 406
  • 2
  • 9