Rails 4 and Assets

Hello,

do you know this scenario:?

  • you are writing a new appliation and you are utilizing a current Rails 4 release

  • when running in development mode everything is working fine

  • and when you are ready with development and you just have to package and deploy the application a major problem arises: the asset management and how to provide static files completely changes just by modifying the definition in what stage you are.

At the moment the behaviour of Rails applications in production mode is somehow strange and a lot of extra steps are required to get the application configured correctly and to manually generate /copy files, that are part of the software package.

You may ask, why the curent behaviour of Rails apps should be changed! Everything is documented and Rails is running as it is. And that is wonderful. :wink:

In practice I do know a slightly different way to proceed. When your application is ready fo testing you are providing it to the test team within the testing stage. And when tests did succeed, the application is ready to be moved to the production stage. But compared to the development stage things work completely different in Rails applications and a bunch of other / additional gems are activated.

Mmh. I wonder, whether it would be possible to provide one of the following ways out of this behaviour:

  • provide configurations that just work. When an adminstrator is providing additional performance enhancemants like serving static files via fast webservers or caching servers this will enhance the speed of applications. Or:

  • wouldn’t it be possible to provide a ready-configured initializer, that is initializing and generating all caches and cache contents that are required by the application?

What do you think?

Best regards, Mario

PS: I guess, in the wild a number of Rails applications are running with configurations, that are tightly related to development configurations, because they just work and when going life with new releases nobody has the time to care about additional problems and a runtime behaviour that is completely new compared to the one in other stages. And when the application is running and it meets the requirements, why should a project team start the approach to start configuring an application in a new way that has not been tested? And who should pay for this…?