production

Rails 3.1 Deploy to Production (with Apache & Passenger) Asset Problems

我们两清 提交于 2019-12-02 18:33:11
Rails 3.1 has changed the way it handles the asset pipeline and it is causing issues when deploying to production. I am using Apache and Passenger, which seem to work fine. My production is setup like this (for now). # congif/environments/production.rb config.cache_classes = false config.consider_all_requests_local = true config.action_controller.perform_caching = true config.serve_static_assets = false config.assets.compress = true config.assets.compile = false config.assets.digest = true config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache I run rake assets:precompile on

Rails: Best way to make changes to a production database

久未见 提交于 2019-12-02 18:32:09
I need to make changes to an in-use production database. Just adding a few columns. I've made the changes to the dev database with migrations. What is the best way to update the production database while preserving the existing data and not disrupting operation too much? It's MYSQL and I will be needing to add data to the columns as well for already existing records. One column can have a default value (it's boolean) but the other is a timestamp and should have an arbitrary backdated value. The row counts are not huge. So if I use migrations how do I add data and how do I get it to just do the

Tracing memory corruption on a production linux server

此生再无相见时 提交于 2019-12-02 18:21:25
Guys, could you please recommend a tool for spotting a memory corruption on a production multithreaded server built with c++ and working under linux x86_64? I'm currently facing the following problem : every several hours my server crashes with a segfault and the core dump shows that error happens in malloc/calloc which is definitely a sign of memory being corrupted somewhere. Actually I have already tried some tools without much luck. Here is my experience so far: Valgrind is a great(I'd even say best) tool but it slows down the server too much making it unusable in production. I tried it on

Git production/staging server workflow

爱⌒轻易说出口 提交于 2019-12-02 13:49:33
Currently my website (production server) already have a lot of code in it. And now I want to start using Git for my projects and setup a staging server for my team. Can anybody give me any advise? Here is the picture in my mind: Production - Production server which already have codes ↑ Staging - New staging server, will install Trac too ↗↙ ↖↘ Developer1 Developer2 - Local development My question is, how should I start? Here are some steps in my mind: do a git init in production server (is this safe?) clone the repo from production to staging server developers clone the repo from the staging to

nodejs express app deploying to production

ぃ、小莉子 提交于 2019-12-01 22:18:50
Sorry if this is a basic question, I am still wrapping my head around nodejs deployments. I have an app written on nodejs which I want to deploy to production. So far for testing purposes I have used Express. However from what I know Express is a dev server and not a production server. How do I deploy the nodejs app to production and what is the server I should use. Plus I have a lot of code written for express like routes and middleware, how does this work when I deploy to another server? When you create your application with express.js, all express modules have been specified in package.json

Rails JavaScript views not working in production

冷暖自知 提交于 2019-12-01 20:53:34
问题 I'm having an unexplainable issue with my Rails app. I'm using a lot of JavaScript in all parts of the app. In development everything is working just fine, but in production it seems that the code in my javascript views is not executed. This is particularly odd because all other JavaScript on the page works great. Custom tabs with JavaScript work. Even my custom made calendar works as expected. The only things that do not work are remote links which trigger views ending with .js.coffee. My

Rails JavaScript views not working in production

六眼飞鱼酱① 提交于 2019-12-01 19:07:32
I'm having an unexplainable issue with my Rails app. I'm using a lot of JavaScript in all parts of the app. In development everything is working just fine, but in production it seems that the code in my javascript views is not executed. This is particularly odd because all other JavaScript on the page works great. Custom tabs with JavaScript work. Even my custom made calendar works as expected. The only things that do not work are remote links which trigger views ending with .js.coffee. My webkit inspector returns this when clicking a remote link: http://cl.ly/Ihyf However, when looking at the

Producing all possible matches of a regular expression

不羁岁月 提交于 2019-12-01 16:24:09
问题 Given a regular expression, I want to produce the set of strings that that regular expression would match. It is important to note that this set would not be infinite because there would be maximum length for each string. Are there any well known algorithms in place to do this? Are there any research papers I could read to gain insight into this problem? Thanks. p.s. Would this sort of question be more appropriate in the theoretical cs stack exchange? 回答1: In the Perl world we have a module

Can't access log files in production

女生的网名这么多〃 提交于 2019-12-01 13:07:28
问题 I was trying to run my application and check for some output on the production.log. However Ruby on Rails throws this error. Apache log Rails Error: Unable to access log file. Please ensure that /var/www/somefolder/someapp/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed. I have performed the necessary chmod 666 production.log to make it work but I realized that the file is under root access. So my

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