Re: redirect_to does not work unless call the to_s for the URL

2011-02-05 Thread Keenan Brock
When I do a redirect I try to use user_url instead of user_path. Since the browser only redirects to absolute urls, rails converts them. No use having rails generate a path only to have it convert it into a url. No idea why it would not work thought. --Keenan On Feb 5, 2011, at 1:19 AM, Hu

Re: Your application is too busy to open a console session.

2011-02-13 Thread Keenan Brock
It is a read only filesystem. So sqlite3 would not work On Feb 13, 2011, at 6:20 AM, Vinicius de Araujo Barboza viniciusbc...@gmail.com wrote: I'm also new to Heroku and get the same error here following the documentation guide. And another question about databases: Does Heroku support

Re: IDE?

2011-03-13 Thread Keenan Brock
It was moved to herokugarden.com, but alas. It is no longer with us. And if you guys don't bring back the service from the dead, I'd love to see how the source worked on the back end. Could you host something like that on Heroku? Guess it would probably need a read/write file system. --Keenan

Re: What is rails3_disable_x_sendfile?

2011-03-21 Thread Keenan Brock
Hi Trevor, config/environments/production.rb line 12 # Specifies the header that your server uses for sending files # config.action_dispatch.x_sendfile_header = X-Sendfile # For nginx: # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # If you have no front-end server

Re: What is rails3_disable_x_sendfile?

2011-03-21 Thread Keenan Brock
Hello Trevor, Web servers (e.g.: Apache) is tuned for serving up static files. Ruby (e.g.: mongrel) is not as efficient at serving up static files. But sometimes, your ruby code generates a file that needs to be streamed. Or it uses logic to determine the name of an existing file that needs to

Re: Varnish and conditional GET

2011-03-23 Thread Keenan Brock
Hi John, I just ran redbot on a project and am happy with the results: I wanted the thing to never time out. (you probably want something a little less dramatic) http://redbot.org/?uri=http%3A%2F%2Fmonster-avatar.heroku.com%2Favatars%2F33.png You can look at the source to get an idea of the

Re: Public Assets and Serve

2011-03-29 Thread Keenan Brock
Hi John, That is a rails 3.0 thing. I thought Heroku would change that setting for you, but I may be wrong. go into config/environments/production.rb make sure you see: serve_static_assets=true more information: http://devcenter.heroku.com/articles/rails3 Good luck, --Keenan On Tuesday, March

Re: Has caching strategy changed? Seeing different ETags via redbot.org

2011-04-07 Thread Keenan Brock
Barry, One thing you may want to try. stale?() and fresh_when() accept arrays for the :etag argument --Keenan On Thursday, April 7, 2011 at 9:41 AM, Todd A. Jacobs wrote: Heroku doesn't support all forms of rails caching, because it's a read- only filesystem. ETags usually work well, but a

Re: Git commands within app

2011-05-10 Thread Keenan Brock
Hi Clem, heroku cosole is your friend. Locally on some stage servers we use Grit. It ran into trouble running on passenger because git was not in the path. Easy to remedy, but since Grit eats the errors - it was a little tricky to track down. For me at least Heroku has git in /usr/bin (do

Re: Does Heroku still support ImageMagick?

2011-05-10 Thread Keenan Brock
Hi, Just use it in bliss I know the heroku devs have documented using rmagic in a number of areas e.g.: http://devcenter.heroku.com/articles/http-caching And in google docs. Paperclip uses it. You have the options of using it via: Gemfile: rmagick Gemfile: mini_magick backticks --Keenan On

Re: Git commands within app

2011-05-11 Thread Keenan Brock
them) : ENV[COMMIT_HASH] ENV[LAST_COMMIT_BY] Why not another little one, `git describe --tag`, which would be (objectively) useful in many use cases ? Thanks :) Clément On May 10, 5:14 pm, Keenan Brock kee...@thebrocks.net wrote: Hi Clem, heroku cosole is your friend

Re: varnish not caching?

2011-06-01 Thread Keenan Brock
Hi craayzie person, You may want to take a look at http://redbot.org/ It tends to give some good pointers to debugging cache headers. You may also want to implement some server side behavior to leverage the ETag Also check out

Re: PostgreSQL contrib modules in dedicated database

2011-06-21 Thread Keenan Brock
fwiw/ hstore has gotten a lot of press lately. At railsconf, some heroku people told me about it, and Aaron Patterson mentioned it in his key note. --Keenan On Monday, June 20, 2011 at 4:08 PM, Peter van Hardenberg wrote: Unfortunately contrib modules are difficult to support on our

Anyone having trouble using heroku console?

2011-07-13 Thread Keenan Brock
Hi, Question: Are others able to run: heroku rake db:migrate OR heroku console puts Model.count ? This is probably user error, but I can't figure it out. reminds me of not specifying RAILS_ENV when running rails console. I had run rake db:seed which populated the Avatar model. I view a page

Re: Anyone having trouble using heroku console?

2011-07-14 Thread Keenan Brock
On Wed, Jul 13, 2011 at 9:06 AM, Keenan Brock kee...@thebrocks.net wrote: Hi, Question: Are others able to run: heroku rake db:migrate OR heroku console puts Model.count ? This is probably user error, but I can't figure it out. reminds me of not specifying RAILS_ENV when running rails console

Re: Is it possible to `git push` heroku config:add or just not restart the app?

2011-08-07 Thread Keenan Brock
Hi You can get some ideas by going into heroku console and typing `env` --Keenan On Sunday, August 7, 2011 at 1:34 AM, kowsik wrote: It's the same as 'git rev-parse --short HEAD'. AFAIK, it's not documented anywhere, found it just out of curiosity on what ENV's heroku sets for the app.

Re: Resque vs Appoxy SimpleWorker

2011-08-29 Thread Keenan Brock
Hi Stephen, Using Resque and Sendgrid (running locally / not on heroku) with 4 resque workers, we are able to completely mail out 30K emails within an hour or two. It took practically no time to enqueue. I may be remembering this incorrectly, as luckily we don't send out slews of emails every

Re: Running out of memory with RMagick on Bamboo

2011-09-27 Thread Keenan Brock
Hi dB, I've had a ton of success avoiding rmagick all together and using the command line version for processing images. Specifically: cropping and merging multiple images together adding color gradients. I think you can also rotate and add text fairly easily. You may be able to steal some

Re: The remote end of my app is hung up.

2011-11-15 Thread Keenan Brock
it looks like you have not linked the remote server heroku to your git repo There are 2 common setups. 1) linked to github remote origin = github remote heroku = heroku 2) linked to heroku remote origin = heroku do a git remote -v I'm guessing you are using setup #2 git push origin master

Re: Allow top-level domains to point to a vanity subdomain?

2012-02-20 Thread Keenan Brock
Hi Martin, There are 2 things. 1. The browser needs to resolve the domain name to heroku's servers. You tell DNS to point a.app.com (http://a.app.com) or example.com (http://example.com) to the right app server [app.heroku.com (http://app.heroku.com)]. The CNAME record does this. You can tell

Re: Sanity check: pg follow - alter column

2012-03-14 Thread Keenan Brock
Hi Carson, Adding a column is quick Renaming a column is quick too. Updating… not so much. I would 1. create/run a migration that adds the column. do not add any indexes on the column yet 2. update the columns: start_id = connection.select_value select min(id) from big_table where new_col

Re: Find out the name of the app I'm running on?

2012-03-14 Thread Keenan Brock
Hi V, to see all your apps: heroku list to see your remote repository: git remote -v if you look at the heroku (or origin), you'll probably see your app name right before the .git —Keenan On Wednesday, March 14, 2012 at 2:42 AM, vierundsech...@googlemail.com wrote: This appears to be

Re: Web Dyno Unresponsive for 10 minutes after deploy/restart

2012-03-21 Thread Keenan Brock
I tend to jump to the conclusion that it is a disk access issue. It can be paperclip, imagemagick, sass, asset bundling, and stuff like that that may be misconfigured to write to the local filesystem. Locally I: rm -rf tmp/* chmod -R a+w tmp sudo su another_user ./rails s (you may have to

Re: Scalability of Heroku worker job with external network connection

2012-03-28 Thread Keenan Brock
Hello Gkr, Yes, multiple workers can run at the same time. People like delayed job and resque, though I'm sure there are other options out there as well. The processes can access external ports. You may have to have a paid account for that (credit card on file). One thing to keep in mind,

How do others deal with cedar rails 3.2 and asset pipelines?

2012-03-31 Thread Keenan Brock
Hi All, I'm running rails 3.2 on cedar. heroku config |grep BUNDLE BUNDLE_WITHOUT = development:test:assets Gemfile (the asset part at least) group :assets do gem 'sass-rails', '~ 3.2.3' gem 'coffee-rails', '~ 3.2.1' gem 'uglifier', '= 1.0.3' gem bootstrap-sass, '~ 2.0.1'

Re: Scalability of Heroku worker job with external network connection

2012-04-02 Thread Keenan Brock
am using Delayed Job. But code that connects to external server from different worker process may connect to same server IP/Port at the same time due to they are running in parallel, is that work without problem ? On Mar 28, 6:22 pm, Keenan Brock kee...@thebrocks.net (http://thebrocks.net

Re: Gem Manifest deprecation

2012-04-06 Thread Keenan Brock
Hello Michel, I think this is a great example of heroku being ahead of their time. When .gems was introduced, there wasn't a way to specify gem dependencies in a ruby project. Back then, dependencies were a mess - heroku even had to run their own custom fork of rails. Now, the Gemfile is a

Deploying to Cedar

2012-04-11 Thread Keenan Brock
Hi all, Is anyone able to deploy to cedar? I'm on a mac Lion, 1.9.2, rails 3.2.3 Last night it was giving me grief on my Gemfile being modified and that I needed to bundle install to update Gemfile.lock. Today, it is saying it can not find the rake gem. I even dropped my app and recreated

Re: Deploying to Cedar

2012-04-11 Thread Keenan Brock
...@gmail.com (http://gmail.com) wrote: Yes, I just pushed a 3.2.2 app. However, it just said Using rake (0.9.2.2), so if your issue is installing rake, this may not prove anything. On Apr 11, 9:19 am, Keenan Brock kee...@thebrocks.net (http

Re: permission denied when trying to run heroku commands

2012-05-15 Thread Keenan Brock
hi, a. may want to check the first line of manage.py ensure it doesn't hardcode the location of python #!/usr/bin/env python b. also make sure it is executable chmod 755 fastparqsite/manage.py (and commit it) c. add python to the command? heroku run python fastparqsite/manage.py Just a few

Re: permission denied when trying to run heroku commands

2012-05-15 Thread Keenan Brock
Hi, Not sure if I understand what you are asking. I assumed this was source code that you checked into git. And you want to run your script. I also assume that while web users may upload files to a temp directory or something, the are not be able to modify any of your website code. Are you

Re: Error/maintenance pages request -- iframe document.domain

2012-05-29 Thread Keenan Brock
Hi Aseem, You should probably send the request to Heroku's support. Since you are asking them to do something. This list is more of a community support effort, and less of a Heroku please do things. That sounds like a great feature Best of luck, Keenan On Monday, May 28, 2012 at 10:18 PM,

Re: Background Jobs For Mission Critical Info

2012-09-27 Thread Keenan Brock
Hi Carson, You may also want to look at https://github.com/ryandotsmith/queue_classic Ryan is also at Heroku. And designed this with the heroku infrastructure in mind. I have not used queue classic, but have had good experience with DJ and Resque. (not a big fan of backgroundrb) --Keenan On

Re: How do you manage your production secrets (API key's etc.) without using source control?

2012-10-29 Thread Keenan Brock
Hi Jay, I really like storing config vars in .env adding the file to gitignore and it doesn't go into the database If you didn't get enough from the heroku-config gem, there are more details are in a heroku article: https://devcenter.heroku.com/articles/config-vars#using-foreman Since foreman

Re: How do you manage your production secrets (API key's etc.) without using source control?

2012-11-19 Thread Keenan Brock
to access the config store. On Mon, Oct 29, 2012 at 12:39 PM, Keenan Brock kee...@thebrocks.net (mailto:kee...@thebrocks.net) wrote: Hi Jay, I really like storing config vars in .env adding the file to gitignore and it doesn't go into the database If you didn't get enough from

Re: Copying DB data from Heroku Postgresql to local server

2013-01-21 Thread Keenan Brock
I wonder if your functions will fail as well. Will vacuum or statistics recompiles all the stored procedures and functions? Google didn't show me any more information on this one. I remember in Sybase, changing the statistics on a table too much used to reek havoc, slowing queries down by over

12 factor application testing

2013-02-05 Thread Keenan Brock
Hi All, I have all my configuration values in environment variables. But this seems to break down for running tests. We only have 1 .env file that we source from .rvmrc. So the same environment variables are used for both development and test (rails console and rake spec) The solution for

Re: x_sendfile_header

2013-02-21 Thread Keenan Brock
Hi, I didn't think sendfile would work since nginx is running on different machines from the rails dynos. I'm guessing this is still the case, but am unsure http://stackoverflow.com/questions/2392371/rails-3-x-sendfile-on-heroku Good luck, --Keenan On Thursday, February 21, 2013 at 6:10

Re: Heroku does NOT compile files under assets pipelines in Rails 4

2014-01-08 Thread Keenan Brock
Hi john Make sure your CSS file is included in your config/environments/production.rb Look for a commented out section mentioning application stylesheets and java scripts. maybe precompile asset pipeline? It bites people all the time and there are currently discussions on how to fix in

<    1   2