Tiago Ameller PRO
Joined 2/28/2018
Tiago Ameller PRO said over 3 years ago on Tracking Javascript Errors :
Ok, that was my first insight. I wonder if Rails has already an environment var provided by rails/ujs. Something such window.railsEnvironent(). If not, is easy to set it on the main layout.

Tiago Ameller PRO said over 3 years ago on The Stimulus 2.0 Tutorial :
As you mention bin/webpack-dev-server, a great enhancement for my rails 6 development I did is using foreman
Put a file called Procfile.dev in your app's home directory:
web: bundle exec puma -p 3000 -C config/puma.rb
webpacker: ./bin/webpack-dev-server
log: tail -f ./log/development.log
and call it to start both rails and webpacker servers:
foreman start -f Procfile.dev
You can restart your server when needed calling: 
touch tmp/restart.txt

Tiago Ameller PRO said over 3 years ago on Diving into Hotwire :
I'm confused about this back to the Asset Pipeline. I've made a lot of work migrating my apps to Webpacker, (BTW it was not so easy). For a new Rails 6 project, what do you think is the right approach: Asset Pipeline or Webpacker?

Tiago Ameller PRO said about 3 years ago on Avatars :
I added this feature to a Rails 4.2.5 app.
In development, all worked at first attempt. But in production, gravatar never was returned.
I realized explicit require is needed. So, I had to add this line at top of app/presenters/avatar_presenter.rb
require 'net/http'

Found it, why not, in SO: https://stackoverflow.com/questions/42803138/why-rails-app-need-to-require-net-http-after-deploy-to-a-new-server


Tiago Ameller PRO said about 3 years ago on Seed like a Pro :
Hi,   I use a tiny test_seeds.rb file for feeding my test suite. Due in every test database is cleared, for performance issues, I just put inside some companies and users for signin.