cedar

Rack::Deflater apparently gzip page but it appears as gibberish in browser

大憨熊 提交于 2019-12-24 08:51:16
问题 I've deployed a rails 3.1 app on the new cedar stack on heroku. The new stack doesn't automatically provide gzipping so I've added use Rack::Deflater in my config.ru Testing it through curl with the following command: curl -i -H 'Accept-Encoding: gzip,deflate' http://carbuzz-production.herokuapp.com Returns an header with content encoding gzip and a body that seems compressed. Opening the page in firefox or chrome shows the body untranslated (lots of gibberish). Any idea how to solve this?

“rake aborted! stack level too deep” while deploying to Heroku

我是研究僧i 提交于 2019-12-20 09:53:53
问题 My website used to be working and Heroku precompiled the assets and everything. Now, seemingly out of nowhere, I started to get this message on deploy: Preparing app for Rails asset pipeline Running: rake assets:precompile mkdir -p /tmp/build_31cexir1p9pwn/public/assets mkdir -p /tmp/build_31cexir1p9pwn/public/assets/icons mkdir -p /tmp/build_31cexir1p9pwn/public/assets/icons mkdir -p /tmp/build_31cexir1p9pwn/public/assets mkdir -p /tmp/build_31cexir1p9pwn/public/assets (in /tmp/build

Heroku logging not working

痞子三分冷 提交于 2019-12-17 22:42:10
问题 I've got a rails 3.1 app deployed on Heroku Cedar. I'm having a problem with the logging. The default rails logs are working just fine, but when I do something like: logger.info "log this message" In my controller, Heroku doesn't log anything. When I deploy my app I see the heroku message "Injecting rails_log_stdout" so I think calling the logger should work just fine. Puts statements end up in my logs. I've also tried other log levels like logger.error. Nothing works. Has anyone else seen

heroku run console returns 'Error connecting to process'

跟風遠走 提交于 2019-12-17 22:32:20
问题 I have deployed a rails 3.1 app to Heroku Cedar stack, and am trying to perform a: heroku run rake db:migrate it returns: Running console attached to terminal... Error connecting to process I also try to simply launch the console: heroku run console Any run command returns the same error. Running console attached to terminal... Error connecting to process Looking at the logs I get the error code: 2011-09-25T16:04:52+00:00 app[run.2]: Error R13 (Attach error) -> Failed to attach to process

heroku/cedar javascript not working

谁说我不能喝 提交于 2019-12-13 05:36:00
问题 Somehow can't get javascript to run: Am trying to use rails 3.2.2, Heroku, Cedar stack. The application works fine locally, and seems to be deploying fine to Heroku, but the javascript refuses to run. this thread seemed to cover a similar question but without a good solution in the end so thought i'd try again javascript not running on heroku with rails 3.1 I've stripped down my javascript to the bare minimum as shown below. While i didn't show the heroku deploy log it looks fine (precompile

Load on Heroku Instance seen in heroku run top

丶灬走出姿态 提交于 2019-12-13 02:36:42
问题 When I run heroku run top on my server I see a very high load, currently 36.37 I realise this is probably not the dyno that runs the app, but it does seem very high to me, does this explain poor performance in heroku from time to time? Additionally, where in the architecture is heroku running my command? Any insight would be much appreciated 回答1: Running heroku run top will not run it on the same dyno as your app is running. That will be run in a one-off dyno - something that contains your

Generating file with PDFKit on Heroku - No such file or directory

余生长醉 提交于 2019-12-13 01:24:51
问题 I'm using PDFKit to create pdfs of from a given url within a Resque job on Heroku Cedar. My code looks like: kit = PDFKit.new(url) pdf = kit.to_file("/tmp/#{SecureRandom.hex}.pdf") I then upload the file using fog to S3 for permanent storage. This job usually works, but also fails maybe a third of the time with: No such file or directory - /tmp/a05c165fc80878b75fd15c447695de71.pdf Manually running through the code in console will produce the same error. According to the Heroku docs, I should

用python实现新词发现程序——基于凝固度和自由度

我只是一个虾纸丫 提交于 2019-12-12 22:27:49
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> python学习笔记整理于猿人学网站的 python教程 和 python爬虫 互联网时代,信息产生的数量和传递的速度非常快,语言文字也不断变化更新,新词层出不穷。一个好的新词发现程序对做NLP(自然预言处理)来说是非常重要的。 N-Gram加词频 最原始的新词算法莫过于n-gram加词频了。简单来说就是,从大量语料中抽取连续的字的组合片段,这些字组合片段最多包含n个字,同时统计每个字组合的频率,按照词频并设置一个阈值来判断一个字组合片段是否为词汇。 该方法简单处理速度快,它的缺点也很明显,就是会把一些不是词汇但出现频率很高的字组合也当成词了。 凝固度和自由度 这个算法在文章《互联网时代的社会语言学:基于SNS的文本数据挖掘》 里有详细的阐述。 凝固度 就是一个字组合片段里面字与字之间的紧密程度。比如“琉璃”、“榴莲”这样的词的凝固度就非常高,而“华为”、“组合”这样的词的凝固度就比较低。 自由度 就是一个字组合片段能独立自由运用的程度。比如“巧克力”里面的“巧克”的凝固度就很高,和“巧克力”一样高,但是它自由运用的程度几乎为零,所以“巧克”不能单独成词。 Python实现 根据以上阐述,算法实现的步骤如下: 1. n-gram统计字组合的频率 如果文本量很小 ,可以直接用Python的dict来统计n

RefineryCMS routes for Home page doesn't work

老子叫甜甜 提交于 2019-12-12 14:18:48
问题 just started with RefineryCMS, sorry for newbie question. It runs fine locally and deployed luckily on Heroku Cedar stack. Created a page called Home. /pages/home responds fine. routes.rb root :to => 'pages#home' and works on localhost:3000 but on Heroku it gives error. The app is here: http://refkocedar.herokuapp.com/home works http://refkocedar.herokuapp.com/ does not work How to set Home page to root on Heroku? Thanks for help! $ heroku logs 2012-04-03T02:19:57+00:00 heroku[router]: GET

How do I fix a pgbackups error: backup url is invalid?

空扰寡人 提交于 2019-12-10 20:09:56
问题 I'm trying to follow the instructions on migrating to Cedar (except I did a major rewrite so this isn't a branch of the previous app but a separate one) and stuck at the db migration step. I installed the pgbackup and heroku postgresql addons but get this result: j3(master) : heroku pgbackups:restore DATABASE heroku pgbackups:url --app dada-foe-110 --app something-something-4311 32mQkEpWyJdfplOnXhlCnCRsoxYE12-05-25 --app something-something-4311 EXTERNAL_BACKUP <---restore--- b002.dump !