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

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 PM,

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 han

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

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

2012-11-19 Thread Keenan Brock
env vars > is some secret key to access the config store. > > On Mon, Oct 29, 2012 at 12:39 PM, Keenan Brock (mailto:kee...@thebrocks.net)> wrote: > > Hi Jay, > > > > I really like storing config vars in .env > > adding the file to gitignore and it does

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: 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: 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: 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 ru

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 ide

Re: Deploying to Cedar

2012-04-11 Thread Keenan Brock
11, 9:44 am, Ed Jones 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

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 i

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 co

Re: Scalability of Heroku worker job with external network connection

2012-04-02 Thread Keenan Brock
nan, > > I 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 (h

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-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, thi

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 twea

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 s

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 i

Re: Managing seperate gems locally and on heroku

2012-03-02 Thread Keenan Brock
Hi Neil, Have never used Wicked before, but when using image magick I had some similar code. I ended up moving it into its own module. From there, any common usage patterns ended up moving there as well. It provided a nice insulation layer and cleaned up my logic elsewhere that was not applica

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 D

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: Update the host and remote machine

2011-09-30 Thread Keenan Brock
Hi Richard. I think I heard you correctly. Is this just a typical scenario with 2 developers working on a common code base? (Or 1 developer working from 2 different machines) heroku can act as your central repository. # git remote -v should show heroku as your origin On computer A, You deploy

Re: Jar Files

2011-09-30 Thread Keenan Brock
Just a few random thoughts: A) When working in C and Java, we compiled the program, tested it, and shipped the very same executable. We did not want it to get rebuilt - Something may be introduced in that process. B) I also wonder if there is a way to split up this mailing list to better meet t

Re: getting started

2011-09-29 Thread Keenan Brock
Hi Chris, Assuming you are using Gemfile add: gem 'pg' —Keenan On Monday, September 26, 2011 at 6:39 PM, Chris Finch wrote: > Hi , sorry for the newb question but I followed the getting started > with Heroku guide, got to the heroku rake db:migrate part and get the > following: > > > r

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 i

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 n

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: Anyone having trouble using heroku console?

2011-07-14 Thread Keenan Brock
ile? >> Once you have that working locally, it should work fine on heroku. >> >> Best, >> Terence >> >> >> >> On Wed, Jul 13, 2011 at 9:06 AM, Keenan Brock wrote: >>> Hi, >> >>> Question: Are others able to run: heroku rake db

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: 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 databas

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 http://railslab.newrelic.com/2009/02/26/episode-11-advanced-http-ca

Re: Git commands within app

2011-05-11 Thread Keenan Brock
ike Heroku team is already almost doing this (thanks TJ ; I > didn't noticed 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 ? > > T

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-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 `ls

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: 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: 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 hea

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 b

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: 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: Rails 3 app not serving static content (png images)

2011-03-08 Thread Keenan Brock
Hi Damo, file config/environments/production.rb: config.serve_static_assets = true see: http://devcenter.heroku.com/articles/rails3 --Keenan On Mar 8, 2011, at 5:21 PM, Damo wrote: > Hi > Im a bit of a rails newbe and am having what is probably a simple > problem to fix but i just cant seem

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 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 SQLite3? > > On Feb 1

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 K

Re: Scaling - Big and Fast

2011-02-03 Thread Keenan Brock
Neil, A bit of a tangent, but... I'd imagine varnish may cut down the load on the dynos. Heroku may buy you quick scaling, but it also has other infrastructure (memcached, varnish) in place to alleviate the load. --Keenan On Feb 3, 2011, at 9:17 AM, Christos Zisopoulos wrote: > 100k/minute !

Re: Download rate 260 KB/s

2011-01-25 Thread Keenan Brock
Hi Oliver, For many static files, we are using amazon s3 / cdn That may work for you as well. --Keenan On Jan 25, 2011, at 2:30 PM, Dennis wrote: > I believe the charges for an additional dyno(s) are usage based so it > would be a relatively cheap experiment to add a dyno and do a test. I > cou

Re: creating a virtual file

2011-01-24 Thread Keenan Brock
Hi Shai, It sounds like the app is using XML as their data store. And right now, rails (and Heroku) make it easier to use a relational db to store data. While you could hack together a solution that stores the data file in memcache, redis, or something, I wonder how hard it would be to just st

Re: My (flawed?) attempt to add or subtract workers via Heroku API.

2011-01-20 Thread Keenan Brock
Also a thought. You will need to introduce a lag when you are determining if you need more or less delayed job workers. Otherwise you will spin up too many DJs too quickly. And add/remove them very often. Incurring extra charges. Smugmug spoke about this when they were talking about their on d

Re: Block On File Upload

2011-01-13 Thread Keenan Brock
Hi Tobes, Not sure if this overlaps, but something else to consider: http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?uploadobjusingmpu.html Good luck, Keenan On Jan 13, 2011, at 3:33 PM, Jimmy Thrasher wrote: > Hi Tobes, > > Unless they've removed the 30s hard limit, you shou

Re: 1 hour inactivity idling and http caching

2011-01-07 Thread Keenan Brock
Hi, Heroku is providing a service for free. Which is great. So if no one is using your app, heroku swap the app out out so other apps can use the memory for their free apps. Think shared hosting. But for free. If you want your app to be a production app and always instantly available, then you

Re: how to use Heroku in development with view designers?

2011-01-06 Thread Keenan Brock
It may be hard for the dev to develop haml/erb without the models to populate it. 1. Have them dev in pure html using a scratch directory in public. Create a separate git repo that only has your public in it You can go have public as a submodule route or you can just have 2 different projects

Re: Smaller fonts in production?

2011-01-06 Thread Keenan Brock
Hi Carson You probably already tried this, but In your browser, for local dev, could you check your zoom level? You may have enlarged your font with command plus. There is a menu option for resetting it to normal view. (exact verbiage escapes me but should be near increase font size in view or

Re: Changing an application when not an owner

2011-01-04 Thread Keenan Brock
Neil, You may want to check out this article: http://getsatisfaction.com/heroku/topics/can_i_use_different_heroku_credentials_on_different_projects Please share if any of those suggestions work for you. --Keenan On Jan 4, 2011, at 11:50 AM, Neil wrote: > Back when the Heroku gem used a credent

Re: Wildcard subdomains with GoDaddy

2010-12-20 Thread Keenan Brock
t > *.yourdomain.com at heroku.com. If things are set up correctly you > should be able to look up any arbitrary subdomain:" > > ... which seems like a cop-out statement. > > Any ideas on this? > > On Nov 15, 11:57 am, Keenan Brock wrote: >> Hi Jeff, >>

Re: github help

2010-12-03 Thread Keenan Brock
You may want to double check the ref on prod. I see the app name is myapp but the ref is myapp-prod. (may be correct or a translation layer) Also, you may want to create a local branch for production. Up to you. Have that branch tied to production. But that is up to you / your workflow. Last: yo

Re: Wildcard subdomains with GoDaddy

2010-11-15 Thread Keenan Brock
Hi Jeff, I had it working before I switched everything over to http://namecheap.com/ 2 things to try: 1) try an @ instead of a * 2) try using A records instead of a CNAME (3 of them) dns numbers are at http://docs.heroku.com/custom-domains 75.101.163.44 75.101.145.87 174.129.212.2 --Keenan

Re: odd issue with bundler, rails3, on bamboo 1.9.2

2010-11-05 Thread Keenan Brock
I'd move the requirement for daemons closer to the beginning in your Gemfile. So it will trump the other gem that requires a lower version. On Nov 5, 2010, at 1:04 PM, Steve Smith wrote: > No sorry it is good practice I wanted to make sure that it was included > sorry, but if you open up the lo

Re: Compiled Slug size not changing after removing large gems from Gemfile

2010-10-12 Thread Keenan Brock
Hi Stephen, If you checked in a gem into git Then you deleted the gem from git. Git still has the gem. It is not showing up for today, but git log will show when you added it and removed it. Guess I do not know if you are checking in your bundle dir and gems into git. 1. So are you saying your

Re: two heroku apps talking to same db

2010-10-05 Thread Keenan Brock
That is great, If you blog about your experience, could you send the link to the list? --Keenan On Oct 5, 2010, at 2:44 PM, Joel VanderWerf wrote: > On 10/05/2010 11:42 AM, Keenan Brock wrote: >> Hello Joel, >> >> I believe the party line is to use web services. >>

Re: two heroku apps talking to same db

2010-10-05 Thread Keenan Brock
Hello Joel, I believe the party line is to use web services. It provides a much better extraction layer. But can be a little tricky. Thought there was an example out there with CAS and single signon Can't find it. Does anyone on the list remembers the link to the single signon example? --Keen

Re: inconsistent Memcache reads

2010-10-05 Thread Keenan Brock
Hi Brandon, Once, I had changed my memcache client library and it started raising exceptions. Turns out the previous library just returned a nil, while this one raised an exception. So I hacked the library to return nil on failures rather than throw exceptions. (The previous library just retur

Re: Getting a visitors ip address in your web app

2010-09-29 Thread Keenan Brock
This used to be a problem with ssl. Don't think it has been resolved --Keenan On Sep 29, 2010, at 1:38 PM, Aaron Brethorst wrote: > I haven't tried this with Heroku, but with another app I had hosted on EC2 I > was able to use request.env['HTTP_X_FORWARDED_FOR'] to get this. > > On Sep 28, 201

Re: Caching of /public files

2010-09-22 Thread Keenan Brock
I could have sworn it was 24. But the documentation said 12... http://docs.heroku.com/http-caching What is the best channel to request an update to the docs? --Keenan On Sep 22, 2010, at 3:08 PM, Oren Teich wrote: > Heroku by default caches all static assets in /public for 24 hours. > > Oren

Re: Caching of /public files

2010-09-22 Thread Keenan Brock
I agree with Steve, 1) Static assets served from public are cached for 12 hours. ( http://docs.heroku.com/http-caching under Static Assets) 2) Setting up your own Rack::Static has a bug in it that is not setting the cache headers, and it is not possible to override. I thought the Heroku team

Re: wonderful platform for app staging...

2010-09-20 Thread Keenan Brock
Hi Roy, Have you checked out http://docs.heroku.com/ ? --Keenan On Sep 20, 2010, at 8:32 PM, Roy Wang wrote: > Yes, GitHub+Heroku is fantastic. If only Heroku had better documentation... > Is there a wiki for Heroku? > > Roy > > > > On Tue, Sep 21, 2010 at 8:07 AM, Dennis wrote: > I

Re: Git, SVN and Heroku

2010-09-10 Thread Keenan Brock
Hi 1. Use git as your client (with git-svn). Then just update (from svn) and push to heroku. It works great. If you have trouble, ping me. I haven't done this recently, but can try and dig up some stuff if you need. Issues you may see: deleting directories (e.g. vendor/gems/* )in git doesn't a

Re: Automatic tagging of your 'real' git repo after push

2010-09-08 Thread Keenan Brock
Hi Jeff, Jeweler has a rake task to send tags to github. You may want to take a peek in there to get the code you need. Setting up a deploy:prod rake task or something could tag, push to github, and push to heroku. - Or what ever your process may be. If you can't find what you need, send a pin

Re: free vs. paid heroku app performance

2010-08-31 Thread Keenan Brock
Hello Deepak, A single / free dyno spins down when it is not in use. Much like passenger / mod_rails on your local box. It cost ram/cpu/money to run a dyno on an ec2 instance. If you are not using it (and you are not paying for it), then there is no reason why Heroku should dish out the money t

Re: Ruby 1.9.2

2010-08-30 Thread Keenan Brock
Hi, I remember hearing: We will add support for 1.9.2 when the community releases the official release. But it looks like it will be out soon. http://twitter.com/heroku/status/21517412884 http://blog.heroku.com/archives/2010/6/15/rails_3_beta_4_on_heroku/ --Keenan On Aug 27, 2010, at 10:19 AM

Re: how to setup mime-type in my rails app

2010-06-24 Thread Keenan Brock
> I'm not sure if I did that right way , anyways check it out yourself , > try to install the following jar file > http://falling-autumn-84.heroku.com/RamadanApp_100.jad > and check out the result . > > Thanks in advance > Eki > On Jun 24, 4:46 am, Keenan Brock wrote: &

Re: how to setup mime-type in my rails app

2010-06-23 Thread Keenan Brock
Hey Eki, hostname = the name of your app filename = the name of the jar file telnet hostname 80 HEAD filename HTTP/1.1 Host: hostname (2 returns) What does it say is the Content-Type? There is probably an easier way to just use firefox ... --Keenan On Jun 23, 2010, at 6:53 AM, Eki wrote: >

Re: Programmatically Spinning Workers Up and Down

2010-06-23 Thread Keenan Brock
Pedro, This is great! One concept I got from a 2007 IT Conversation podcast interviewing GigaVox and SmugMug: You are optimizing cost vs responsiveness. Reducing the granularity of startup and shutting down of instances saves quite a deal of money. Don MacAskill spoke more about this and Sky

Re: Failing Routes

2010-06-21 Thread Keenan Brock
disclaimer: I have not installed rails 3 yet. My reaction is they are looking for controller Admin::HomeController in file app/controllers/admin/home_controller --K On Jun 21, 2010, at 11:03 AM, Neil wrote: > I have an app that has the following in the routes file: > > namespace "admin" do >

Re: Project.where(:status => true)

2010-06-16 Thread Keenan Brock
Hey, I was on a project that was supporting mysql (local build machine), sqlite3 (developer's box), and posgres (heroku) the boolean instances were very tricky across these. Date logic is also a pain ( e.g. time = NOW() ) I ended up implementing a hack on top of active_record connection, that

Re: Preserve cache

2010-06-12 Thread Keenan Brock
S3? On Jun 12, 2010, at 2:41 PM, Alan B wrote: Hi all, I have an app that generates a lot of PDF files that never need to change. I was going to generate them once and then cache them using Varnish and a long expires header. However, I see from the heroku docs that the cache is purged whenever

Re: Newrelic Bronze and Heroku

2010-06-11 Thread Keenan Brock
Many hosting providers have figured out it is cheaper for them to run efficient websites than inefficient ones. Engine yard gives away rpm as well. Or at least they did. I'm pretty sure bronze is 100% free --Keenan On Jun 11, 2010, at 3:52 PM, Amiruddin Nagri wrote: Heroku is offering

Re: EXIF support on Heroku?

2010-06-08 Thread Keenan Brock
Kinda a hack but If you look at mysql, they compile native c code. I played with this in http://github.com/kbrock/tclink Not sure what the dependencies are, but wonder if the code is tight enough to embed it in a gem. --K On Jun 8, 2010, at 10:37 AM, Richard Conroy wrote: > > > On Tue,

Re: Spree 0.10.2 can't start on Heroku

2010-06-02 Thread Keenan Brock
Hi, I'm not a spree person, but I have ported frameworks to heroku. (e.g.: loved by less) not sure if this was already answered Why not copy the default theme to the target spot on your own? Seems the startup code would not copy if it it already existed. And if it did copy it, just add the File

Re: is it possible to allow users to use CNAME or A to point custom domains at my heroku app?

2010-06-01 Thread Keenan Brock
Hi, 1 IP address per website is too expensive. So lots of domains are hosted off the same IP address. HTTP/1.1 (what we've used since ~1998) passes in a Host: parameter. The webserver uses the Host parameter to map the request to the appropriate application. We tell the webserver how to map t

Re: Rails 2.3.6

2010-05-25 Thread Keenan Brock
Two things you may want to keep in mind: People mentioned rails 2.3.4 -> 2.3.5 breaking a number of tests. I think Rails 2.3.7 is just around the corner. --Keenan On May 25, 2010, at 12:26 PM, Matthew A. Brown wrote: > Hmm, interesting. I still haven't been able to get Heroku to install > rails

Re: MySQL --> Postgres LIKE find error

2010-05-25 Thread Keenan Brock
Edoardo, 1. you may do well to store the id as a string you can index that, and many databases will use an index with a like clause (given the % is on the right hand of the string) only way I know how to create this is using: def after_create if id_string.blank? id_string=id.to_s

Re: hosting app on root domain?

2010-05-19 Thread Keenan Brock
usually recommend people use Google Apps ( www.google.com/a/ ) for their > domains - its free and usually meets people's needs. > > --wuputah > > On Wed, May 19, 2010 at 5:02 PM, Keenan Brock wrote: > John, > > Also don't forget. > > Hosting the root

Re: hosting app on root domain?

2010-05-19 Thread Keenan Brock
John, Also don't forget. Hosting the root is easy Hosting the email portion (aka MX record) has proven a little more tricky. I have not used Zerigo DNS. I'm moving from godaddy to namecheap this month hoping that will resolve the issues. --Keenan On May 19, 2010, at 4:16 PM, Oren Teich wrote:

Re: Do you pay for multiple apps, or only multiple dynos per app?

2010-05-17 Thread Keenan Brock
Hello Brian, You want to have one code base that is hooked up to 2 heroku apps. (staging, production) Each of the heroku apps gives you 1 dyno for free. I like the article at: http://jqr.github.com/2009/04/25/deploying-multiple-environments-on-heroku.html (see also: http://stackoverflow.com/q

Re: development works fine but production on heroku complain about caling count on []

2010-05-12 Thread Keenan Brock
Adam, When we run centos, it only has ruby 1.8.5. And [].count is not defined. But unsure why heroku would fail on this - thought they were running 1.8.7 (or newer depending upon your stack) Maybe monkey patching is your friend? --Keenan On May 10, 2010, at 10:37 PM, adam wrote: > My heroku

Re: Deploying with Bundler from private repos on GitHub

2010-05-12 Thread Keenan Brock
Hi Fredrik, I think you can checking in the gem archive directory with the .gem archives. so in theory, you can check in all the files you need. Not sure the religious implications of that though. Whether is is a good idea or bad. It sounded like it bought you some speed boosts too. --Keenan

Re: sharing app on multiple machines

2010-05-11 Thread Keenan Brock
On my iPhone, Sorry if this was already addressed. Github is free for public archives. Which works for many. As you mentioned, They also have a paid option if you want private repos and other options. If you google: github Heroku workflow, there are a number of examples of how to use git an

Re: Time zone issue, Rails 3 - Time.zone = set, but heroku still using local server time

2010-05-03 Thread Keenan Brock
Hi Daryl, I'm still living in 2.3 land, but one thing I often see is using Time.now vs Time.zone.now Also, in test_helper (not sure the rails 3.0 equivalent), I needed to set a default Time.zone - otherwise the Time.zone is nil, so Time.zone.now throws exceptions --Keenan On May 3, 2010, at 1

Re: Using Time.now in AR#find :conditions - not working correctly?

2010-04-20 Thread Keenan Brock
I really like the way this was written up in DelayJob / job.rb def self.db_time_now if Time.zone Time.zone.now elsif ActiveRecord::Base.default_timezone == :utc Time.now.utc else Time.now end end FWIW/ --Keenan On Apr 20, 2010, at 2:01 PM,

Re: Suggestion: Make db:push a little safer

2010-03-25 Thread Keenan Brock
I have something like the following defined desc 'prompt are you sure' task :are_you_sure do unless ENV['FORCE'] == 'true' puts "" puts "THIS WILL BLOW AWAY THE DATABASE" puts "hit enter to continue (control c to abort)" puts "" STDIN.read(1) end end task :refresh => %w(ar

Re: "Taps Server Error: year too big to marshal" when doing a db:pull

2010-02-15 Thread Keenan Brock
Hello Paul, It looks like you have a record with a year too big for sqlite. I have run into this in non rails situations importing year '9' to MSSql - it was a bug in my code that did not add 2000 Looks like you only have 2 tables to choose from (users, payments, credits and streams were succes

Re: A key is required to write a cookie containing the session data.

2010-02-09 Thread Keenan Brock
Hey Chaz, for rails apps, config/initializers/session_store.rb usually has a secret key ActionController::Base.session = { :key => '_charles_session', :secret => 'XX' } you can get a good session key by running: rake secret Create the file and see how it goes. --Keenan O

Re: dns wtf for .it domain

2010-02-08 Thread Keenan Brock
Hello Shane, it takes a little time for these things to propagate across the internet. Sometimes up to 3 days. And to make it worse, your computer, your router, and possibly your hosting provider all cache the records. So it is tricky to know once you got it right. I tried the url and got the p

Re: flush memcached?

2010-01-23 Thread Keenan Brock
Hi, You can try ActionController::Base.cache_store.clear That is assuming that you have assigned your memcache to the cache_store. --Keenan On Jan 23, 2010, at 5:08 PM, walker wrote: > Is there a way to flush the memcached cache for your app? I have some > bad page data (my own fault, was play

Re: Accidental 'heroku db:reset'

2010-01-09 Thread Keenan Brock
Hi Ryan, I tend to not use the Heroku commands from the command line. I created a rake task staging:push that resets and pushed and migrates and shows a splash page and shows a warning. Maybe even git tag while you are at it. You can call it s:push and p:push (staging, production) if you w

Re: Nesta

2009-12-29 Thread Keenan Brock
Hi, As an alternative, you may want to keep the hit directory around git co -b production #create a Heroku branch git remote add heroku git:// ... Heroku ... You will need to setup the default destination for this branch (I defer to what ever suggestions the git command provides) Make sure yo

Re: How can I disable models and/or tweak config.load_paths?

2009-12-03 Thread Keenan Brock
Why not try app/models_legacy/ That is not included by default in rails. so you could get a difference. Best of luck, Keenan On Dec 3, 2009, at 11:26 AM, Patrick Crowley wrote: > My app won't launch because it has some Legacy models that rely on > a :legacy database adapter. > > I have no intent

Re: db:push unable to find taps

2009-12-02 Thread Keenan Brock
HEy Chris, For a while I noticed that taps created invalid urls that contain a password. I think the url encoding would screwup with the : (between username/password) or something like that. I used to manually create the url and all would work. It has been a while since I've been on that proje

Re: installing gems from gemcutter not as it should be

2009-11-02 Thread Keenan Brock
Just a thought. Are the requests to gemcutter using HTTP? Is the system using ETags / If-Mod-since? Seems there could be a way to use a forward proxy to gemcutter. It would help out: 1) less bandwidth for both gemcutter and heroku 2) faster image build times on heroku 3) less load on the gemcut

Re: Installing Radiant extension

2009-09-25 Thread Keenan Brock
Hi Thomas, for testing, sometimes I: chmod -R 555 rails_app chmod 755 rails_app/tmp and I run from there That usually allows me to recreate the problem locally and I go from there. Keep the questions coming, --K On Sep 25, 2009, at 6:02 AM, Thomas Balthazar wrote: > > Hello John, > > Thank

  1   2   >