production-environment

paperclip working in development but not working in production?

ぐ巨炮叔叔 提交于 2019-11-29 20:55:50
问题 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.

How to tell if rails is in production?

北战南征 提交于 2019-11-29 20:32:18
I used script/server -e production to start rails in production mode. It did and I got no errors. However how do I tell if it is in production mode? I tried a non-existent route, and I got a similar error page I did in development. I thought if under production model, I get the 404 error page that is in my /public folder. Does it mean it didn't start in production mode? Thanks for your help. 2 easy ways: tail -f log/production.log if there are entries populating that log after you hit the app, you're in production mode. second way: in one of your views (probably the layout is good), just add <

Best and safest Java Profiler for production use? [closed]

纵饮孤独 提交于 2019-11-29 19:43:18
I'm looking for a Java Profiler for use in a very high demand production environment, either commercial or free, that meets all of the following requirements: Lightweight integration with code (no recompile with special options, no code hooks, etc). Dropping some profiler specific .jars alongside the application code is ok. Should be able to connect/disconnect to the JVM without restarting the application. When profiling is not active, no impact to performance When profiling is active, negligible impact to performance. Very slight degradation is acceptable. Must do all the 'expected' stuff a

disabling Devise registration for production environment only

痞子三分冷 提交于 2019-11-29 18:43:40
I am launching a beta site with a select group of users. I want to disable registration in the production environment only, and only for a short period of time (i.e. I don't want to nuke my registration altogether). I know I can simply hide the "sign up" link, but I suspect that hackers smarter than I can still use the RESTful routes to accomplish registrations. What's the best way to disable registration so my test/development environments still work, but production is affected? Thanks for any pointers. I've tried pointing named scopes in such a way that "sign_up" goes to "sign_in", but it

Deploying a production Node.js server [closed]

≡放荡痞女 提交于 2019-11-29 18:42:10
I've written a Node.js app, I'm looking to get it running on one of our production machines. This seems like a pretty common request yet I can't find an adequate solution. Is there not established solutions for deploying production Node.js apps? The app is simple (<100 LOC), but needs to be very efficient, reliable and could run continuously for years without restarting. It's going to be run on a large site, with dozens of connections/second. (the app is not used as a webserver, it only has a JSON API) Here are the approaches I've considered but I'm still not sure about: Using a framework (eg.

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

荒凉一梦 提交于 2019-11-29 15:32:01
This question already has an answer here: How can I make a ServletContextListener stop the Java EE application? 2 answers 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 servlets? Those servlets should not execute if the environment is not suitable (such as no database available). How to gracefully

Is it possible to exclude grails plugin from production environment?

爷,独闯天下 提交于 2019-11-29 14:27:34
问题 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? 回答1: 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

Problems with ckeditor running on production Rails application with Heroku

半世苍凉 提交于 2019-11-29 00:24:42
问题 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

Handling passwords in production config for automated deployment

梦想的初衷 提交于 2019-11-28 21:23:40
问题 I have seen related questions here, but they don't seem to be answering exactly what I need. We use Powershell scripts to deploy our applications and the info like passwords in configuration files for most of the environments ( UATs etc. ) are in plain text. It is not a big issue, but when it comes to PREPROD and PROD, it is a big issue. So we had some markers in the config like "{{prompt-password}}" which will give a login dialog ( Get-Credential ) and the person doing the deployment can

disabling Devise registration for production environment only

心不动则不痛 提交于 2019-11-28 14:52:41
问题 I am launching a beta site with a select group of users. I want to disable registration in the production environment only, and only for a short period of time (i.e. I don't want to nuke my registration altogether). I know I can simply hide the "sign up" link, but I suspect that hackers smarter than I can still use the RESTful routes to accomplish registrations. What's the best way to disable registration so my test/development environments still work, but production is affected? Thanks for