I am running Rails 5 with Ember & ember-cli-rails
gem. I don't have much in the Rails assets folder because I have a separate frontend folder and ember-cli-rails
helps me mount my Ember app to a Rails route.
I deploy to an AWS instance and whenever I run rake assets:precompile
, it just hangs:
$ rake assets:precompile
RubyDep: WARNING: Your Ruby is outdated/buggy.
RubyDep: WARNING: Your Ruby is: 2.3.0 (buggy). Recommendation: upgrade to 2.3.1.
RubyDep: WARNING: (To disable warnings, see:http://github.com/e2/ruby_dep/wiki/Disabling-warnings )
up to date in 1.441s
Could it be that I need to update Ruby? Probably not right?
Anyway, I read this post amongst others and I have decided that this problem is more so a case by case issue and does not have a one size fits all solution. So I am here to present info about my project in hopes of diagnosing the problem.
My Gemfile:
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'twilio-ruby'
gem 'phony_rails'
gem 'jquery-rails'
gem 'intl-tel-input-rails'
gem 'mysql2'
gem 'sidekiq'
gem 'sidekiq-scheduler'
gem "capistrano", "~> 3.4"
gem 'capistrano-rails'
gem 'capistrano-bundler'
gem 'capistrano-rbenv'
gem 'capistrano3-puma'
gem 'ember-cli-rails'
gem 'active_model_serializers', '~> 0.10.0'
I have a good amount of Ember code and this is the output when I load the Ember app after running rails s
:
Build successful (21977ms)
Slowest Nodes (totalTime => 5% ) | Total (avg)
----------------------------------------------+---------------------
Babel (28) | 15879ms (567 ms)
EslintValidationFilter (2) | 2292ms (1146 ms)
Rendering html template
Rendered html template (0.1ms)
Rendered /usr/local/lib/ruby/gems/2.4.0/gems/ember-cli-rails-0.9.0/app/views/ember_cli/ember/index.html.erb (32443.1ms)
Completed 200 OK in 32465ms (Views: 32453.4ms | ActiveRecord: 0.0ms)
So it already takes some time but it seems on my EC2 instance, this time inflates exponentially. Any ideas why? Should I just increase the RAM? I feel like that is not the ideal solution.
tl;dr:
ember-cli-rails
gem?assets:precompile
?--verbose
isn't an option BUT rake some_command --trace
IS an option!! It helped me identify some dependency problem with my ember version.