Heroku, Rails 3, and Sass
A friend of mine modified Hassle and made this great little writeup: http://mentalized.net/journal/2010/04/06/heroku_rails_3_and_sass/ Cheers, Casper Fabricius -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Streaming files without locking up dynos
Here's a little tough love: stop using Twilo. They don't provide the features that you need. Requiring you to make multiple hacks to your code and bringing the code through your server to fix headers means it isn't worth the price you are paying. Put the files on S3 and be done with it. I don't know what Twilo is, or if I am spelling it right for that matter, but if you need to get them to fix their service or leave. On 4/6/10, Eric Anderson e...@pixelwareinc.com wrote: I am having some difficulty trying to figure out how to stream out files from Heroku without locking up my dynos. The basic setup I am making an app that combines Heroku and Twilio. Part of this app involves presenting users with the recordings that have been made on Twilio. Twilio provides a URL to these recordings but they don't really set the headers right (for the MP3 they don't provide the content length messing up some clients and they don't set the content disposition to attachment causing some clients to play the file inline and not do a very good job at that). In addition to these headers issues I would ideally like to not give out the URL to the recording as it is not protected by any authentication. Attempt One --- So my first thought was to simply proxy the download through Heroku. I figured this would allow me to adjust the headers and hide the Twilio URL. The problem with this is that while proxying the file it prevents the dyno from handing other requests. I had hoped if I streamed the content out (in rails render a block that chunks it out) or by using some sort of sendfile header. None of those options worked. I contacted support about this hoping there would be a decent solution but they said a dyno gets locked up until the file is downloaded. There is no way around this. This means that if I get a user on a slow modem downloading a file it takes down the dyno. If I get a multiple slow people downloading files and don't have enough dynos it basically will take down my site. :( Attempt Two -- So my next thought was to allow them to download from a location other than Heroku but still one where I have control over the HTTP headers. S3 seemed like an ideal candidate as Heroku runs on Amazon as well. So I wrote the code to copy the file from Twilio to S3 through Heroku when a download is requested then redirect to S3. This works but not well. It still locks up my dyno for about 20 seconds (for a 30 min conversation) while copying (most of the time is spent downloading from Twilio although some still spent uploading from Heroku to S3). Longer conversations would lock up my dynos even longer. I am trying to avoid pre-sending all conversations up to S3 as I want to avoid paying S3 to store the conversations when I am already paying Twilio to store them. I don't mind sending them up to S3 for temp storage but I need to do it on demand and it looks like they can't be downloaded fast enough to make that happen. So I am looking for suggestions of ways to deliver these files while not locking up the dynos. Is there any way to send a file from a URL to S3 without having it go through Heroku. Any suggestions in general? -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Streaming files without locking up dynos
On Tue, Apr 6, 2010 at 1:04 AM, Eric Anderson e...@pixelwareinc.com wrote: I am having some difficulty trying to figure out how to stream out files from Heroku without locking up my dynos. The basic setup I am making an app that combines Heroku and Twilio. Part of this app involves presenting users with the recordings that have been made on Twilio. Twilio provides a URL to these recordings but they don't really set the headers right (for the MP3 they don't provide the content length messing up some clients and they don't set the content disposition to attachment causing some clients to play the file inline and not do a very good job at that). In addition to these headers issues I would ideally like to not give out the URL to the recording as it is not protected by any authentication. Attempt One --- So my first thought was to simply proxy the download through Heroku. I figured this would allow me to adjust the headers and hide the Twilio URL. The problem with this is that while proxying the file it prevents the dyno from handing other requests. I had hoped if I streamed the content out (in rails render a block that chunks it out) or by using some sort of sendfile header. None of those options worked. I contacted support about this hoping there would be a decent solution but they said a dyno gets locked up until the file is downloaded. There is no way around this. This means that if I get a user on a slow modem downloading a file it takes down the dyno. If I get a multiple slow people downloading files and don't have enough dynos it basically will take down my site. :( Attempt Two -- So my next thought was to allow them to download from a location other than Heroku but still one where I have control over the HTTP headers. S3 seemed like an ideal candidate as Heroku runs on Amazon as well. So I wrote the code to copy the file from Twilio to S3 through Heroku when a download is requested then redirect to S3. This works but not well. It still locks up my dyno for about 20 seconds (for a 30 min conversation) while copying (most of the time is spent downloading from Twilio although some still spent uploading from Heroku to S3). Longer conversations would lock up my dynos even longer. I am trying to avoid pre-sending all conversations up to S3 as I want to avoid paying S3 to store the conversations when I am already paying Twilio to store them. I don't mind sending them up to S3 for temp storage but I need to do it on demand and it looks like they can't be downloaded fast enough to make that happen. So I am looking for suggestions of ways to deliver these files while not locking up the dynos. Is there any way to send a file from a URL to S3 without having it go through Heroku. Any suggestions in general? When a user requests a file, put a delayed job to get the file and upload it to S3, then poll with ajax every 1 or 2s (Your file is being prepared…) and then give them the download link to S3 once the upload is complete. That is relatively easy to do with the heroku stack and shouldn't lock anything for you. If you get multiple simultaneous users asking for files, just increase the number of workers so it speeds up the site for everyone—but again, nothing is locked, it just takes more time until the file is ready. Cheers -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
thin error
I'm getting an error with http://astropi-staging.heroku.com/ - just reinstalled the rvm / gems, which means newer bundler (a couple of changes to .bundle). Otherwise everything is is just as before. It runs fine locally. Switched to the bamboo 1.8.7 stack. Did get the same error with argent aspen. Thin web server (v1.0.1 codename ?) Maximum connections set to 1024 Listening on 0.0.0.0:57444, CTRL+C to stop /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/backends/ tcp_server.rb:16:in `connect': no such file to load -- thin/connection (MissingSourceFile) from /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/backends/ base.rb:49:in `start' from /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.6/lib/ eventmachine.rb:240:in `call' from /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.6/lib/ eventmachine.rb:240:in `run_machine' from /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.6/lib/ eventmachine.rb:240:in `run' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/backends/ base.rb:57:in `start' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/server.rb: 150:in `start' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/ controllers/controller.rb:80:in `start' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb: 173:in `send' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb: 173:in `run_command' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb: 139:in `run!' from /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/bin/thin:6 from /usr/local/bin/thin:20:in `load' from /usr/local/bin/thin:20 -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
What is the SSL Hostname Root Domain Behavior?
With the SSL hostname add-on enabled what happens if a user navigates to https://example.com? Is there a way to gracefully redirect them to the www subdomain without causing alerts to the user? -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: What is the SSL Hostname Root Domain Behavior?
Hi Jared, There isn't currently. The problem there is that you'll be served the *.heroku.com certificate immediately. We're looking into whether something can be done to better support this scenario. Best, Morten On Apr 6, 2010, at 1:08 PM, Jared Brown wrote: With the SSL hostname add-on enabled what happens if a user navigates to https://example.com? Is there a way to gracefully redirect them to the www subdomain without causing alerts to the user? -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: What is the SSL Hostname Root Domain Behavior?
Ah, of course. Well I hope something can be figured out this is almost a great solution. Jared On Apr 6, 4:13 pm, Morten Bagai mor...@heroku.com wrote: Hi Jared, There isn't currently. The problem there is that you'll be served the *.heroku.com certificate immediately. We're looking into whether something can be done to better support this scenario. Best, Morten On Apr 6, 2010, at 1:08 PM, Jared Brown wrote: With the SSL hostname add-on enabled what happens if a user navigates tohttps://example.com?Is there a way to gracefully redirect them to the www subdomain without causing alerts to the user? -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
URL rewriting on Heroku?
I'm wondering if there's any way to set up URL rewriting on Heroku. I'm used to doing this on Apache servers via htaccess files, but as I understand it Heroku uses nginx. I'm unsure of where rewriting might take place on nginix, and whether Heroku clients even have access to this area. I'm looking to do some simple SEO-oriented tasks such as redirecting naked URLs to www.* and enforcing a trailing slash on all URLs. Thanks for any help, Matt -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: URL rewriting on Heroku?
I'm guessing your only option here is to do it from within your application itself. Also, I'm guessing it's pretty unlikely that any of that stuff has any effect on search engine rankings in this day and age. On Sun, Apr 4, 2010 at 04:15, Matt Wright wrattmi...@gmail.com wrote: I'm wondering if there's any way to set up URL rewriting on Heroku. I'm used to doing this on Apache servers via htaccess files, but as I understand it Heroku uses nginx. I'm unsure of where rewriting might take place on nginix, and whether Heroku clients even have access to this area. I'm looking to do some simple SEO-oriented tasks such as redirecting naked URLs to www.* and enforcing a trailing slash on all URLs. Thanks for any help, Matt -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: URL rewriting on Heroku?
rack-rewrite On Tue, Apr 6, 2010 at 5:57 PM, Matthew A. Brown mat.a.br...@gmail.comwrote: I'm guessing your only option here is to do it from within your application itself. Also, I'm guessing it's pretty unlikely that any of that stuff has any effect on search engine rankings in this day and age. On Sun, Apr 4, 2010 at 04:15, Matt Wright wrattmi...@gmail.com wrote: I'm wondering if there's any way to set up URL rewriting on Heroku. I'm used to doing this on Apache servers via htaccess files, but as I understand it Heroku uses nginx. I'm unsure of where rewriting might take place on nginix, and whether Heroku clients even have access to this area. I'm looking to do some simple SEO-oriented tasks such as redirecting naked URLs to www.* and enforcing a trailing slash on all URLs. Thanks for any help, Matt -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Looking for a Northscale memcache reference
Hi there, We're getting ready to announce the relationship with northscale. As part of the press activity, we'd like to get a quote from an app using the service. If you're using northscale in a decent way (no hello world apps), and can provide a quote, please contact me directly. Thanks, Oren -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.