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.
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:
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?
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
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.