production-environment

How to Determine the ASP.NET Core Environment in my Gulpfile.js

久未见 提交于 2019-12-01 03:07:11
I am using ASP.NET Core MVC 6 using Visual Studio 2015. In my gulpfile.js script I want to know if the hosting environment is Development, Staging or Production so that I can add or remove source maps (.map files) and do other things. Is this possible? UPDATE Relevant issue on GitHub . You can use the ASPNETCORE_ENVIRONMENT (Was formerly ASPNET_ENV in RC1) environment variable to get the environment. This can be done in your gulpfile using process.env.ASPNETCORE_ENVIRONMENT . If the environment variable does not exist, you can fallback to reading the launchSettings.json file which Visual

gettext translation not working on production system

我只是一个虾纸丫 提交于 2019-12-01 02:35:53
问题 I've encountered a strange problem when translating strings (in the admin) using django's gettext : Locally running the dev server all translations are displayed correctly in the admin, but when the project is deployed on the production server some strings are not translated at all. I cannot determine any system behind which strings are affected and which not! To give you an impression, eg. a model is defined like: class Company(models.Model): .... class Meta: verbose_name = _('Company

How to Determine the ASP.NET Core Environment in my Gulpfile.js

匆匆过客 提交于 2019-11-30 23:05:22
问题 I am using ASP.NET Core MVC 6 using Visual Studio 2015. In my gulpfile.js script I want to know if the hosting environment is Development, Staging or Production so that I can add or remove source maps (.map files) and do other things. Is this possible? UPDATE Relevant issue on GitHub. 回答1: You can use the ASPNETCORE_ENVIRONMENT (Was formerly ASPNET_ENV in RC1) environment variable to get the environment. This can be done in your gulpfile using process.env.ASPNETCORE_ENVIRONMENT . If the

Symfony2: access same route in production as development

一世执手 提交于 2019-11-30 19:27:25
I'm developing a little application using Symfony2. I can access all routes with no problems in my dev environment: http://symfony/app_dev.php/cp ("symfony" is in my hosts file to resolve to localhost) However, as soon as I try and access it in the production environment, I just get a 404 error page: http://symfony/app.php/cp Oops! An Error Occurred The server returned a "404 Not Found". Something is broken. Please e-mail us at [email] and let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused. Is there something I need

Push Notification not working in production environment after switched from sandbox

五迷三道 提交于 2019-11-30 16:27:42
Hi so I'm very confused at the moment and don't know what to do next. I've spent the last two weeks getting these push notifications to work correctly, and when I finally have it all neat and tidy, I put it into an adhoc distribution bundle and switch the server configurations to the production environment, suddenly nothing works and I have no error messages to go off of. It should work, it should work and it doesn't. So I need some help because I'm lost. possible problems - HOST CONFIG What really helped me get it working in the first place was this tutorial here , the hosting server is

Push Notification not working in production environment after switched from sandbox

[亡魂溺海] 提交于 2019-11-30 16:21:52
问题 Hi so I'm very confused at the moment and don't know what to do next. I've spent the last two weeks getting these push notifications to work correctly, and when I finally have it all neat and tidy, I put it into an adhoc distribution bundle and switch the server configurations to the production environment, suddenly nothing works and I have no error messages to go off of. It should work, it should work and it doesn't. So I need some help because I'm lost. possible problems - HOST CONFIG What

paperclip working in development but not working in production?

核能气质少年 提交于 2019-11-30 14:07:57
I'm pretty new to rails and seem to be having an issue with the paperclip gem. I installed the gem and it works well in development (localhost:3000) but when I'm running it on the heroku server, for some reason it does not want to attach files, and the app breaks (error 500 page). Here is the process i ran... I pushed my file to heroku, heroku ran rake db:migrate (to add paperclip migrations), and then I ran heroku restart (to restart the app with new migrations). This did not seem to help. Here is the code that I have for paperclip: user.rb model: has_attached_file :avatar, :styles => {:small

Is it possible to exclude grails plugin from production environment?

旧巷老猫 提交于 2019-11-30 09:39:53
I would like to use certain plugin in development environment, but would like to exclude this plugin from production and from generated war. What is the easiest way to accomplish this? Yes, using plugin scopes. From http://grails.org/1.1+Release+Notes : Plugins can now be scoped using either the environment or predefined build scopes: def environments = ['dev', 'test'] def scopes = [excludes:'war'] The plugins will only load in those environments and will not be packaged into the WAR file. This allows "development-only" plugins to not be packaged for production use. I don't believe that there

Stop launch of web app from `ServletContextListener` method `contextInitialized` [duplicate]

China☆狼群 提交于 2019-11-30 09:22:04
问题 This question already has answers here : How can I make a ServletContextListener stop the Java EE application? (2 answers) Closed 3 years ago . I have implemented a ServletContextListener in a Java Servlet web app via the @WebListener annotation. In my contextInitialized method I do some set-up work and verify that expected resources are available. If I determine in that contextInitialized method that something is wrong, how do I stop the web app from continuing onwards with executing

Problems with ckeditor running on production Rails application with Heroku

别说谁变了你拦得住时间么 提交于 2019-11-30 03:17:43
I'm using the ckeditor gem in my Rails 4 application. Everything works great locally and on my staging heroku environment, but I get this errors when pushing on the production environment : GET http://myapp.herokuapp.com/assets/ckeditor/contents.css 404 (Not Found) GET http://myapp.herokuapp.com/assets/ckeditor/skins/moono/icons.png 404 (Not Found) The editor shows up well, but all icons are missing. I followed the README ( https://github.com/galetahub/ckeditor ), but I'm probably missing something. Here are my steps: 1) Gem installation, generate etc ... 2) config.autoload_paths += %W(#