tag:blogger.com,1999:blog-8733136837014309972014-10-04T21:06:10.689-07:00Rails on GoDaddyRyan Kopfhttp://www.blogger.com/profile/16318410460192759175noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-873313683701430997.post-34378240915302204032008-07-30T13:22:00.001-07:002008-07-30T13:46:22.067-07:00Ubuntu Private ServerAlthough I've always dreamed big, having a <a href="https://www.godaddy.com/gdshop/hosting/dedicated.asp?ci=9014&display=dedicated">GoDaddy private (dedicated) server</a> can be expensive. Their lowest-end, cheapest server might have some pretty decent specs, but also at a whopping $63 per month with a two year contract. Although the disk space, bandwidth, and RAM all stack up well, it's much easier to get <a href="http://www.associatedcontent.com/article/913253/godaddy_shared_hosting_versus_private.html">your own private server</a>. A private server will often come with lower costs and several benefits, although you miss out on some things.<br /><br /><u>Things You Lose</u><br /><ul><br /><li>Secure server location</li><br /><li>Low chance of data loss</li><br /><li>System rarely fails</li><br /><li>Better network security</li><br /><li>Higher power and bandwidth uptime</li><br /></ul><br />The tradeoffs, however, are enormous if you are on a budget. A personal dedicated server can offer lower monthly costs and tremendous long-run benefits. Plus, if you have enough skill, you can ensure that you don't lose many of the other benefits.<br /><ul><br /><li>Higher beginning costs, because you have to buy the server.</li><br /><li>You can always just geting something cheap to put Linux on.</li><br /><li>Could use an old system lying around</li><br /><li>Direct console access</li><br /><li>Absolutely no limits to what you can put on there</li><br /><li>Could get more bandwidth through a regular ISP</li><br /><li>Lower monthly costs (merely to the ISP and for power)</li><br /><li>Could make an equally secure network with enough talent</li><br /><li>Could get a Universal Power Battery to keep uptime high</li><br /></ul><br /><script type="text/javascript"> google_ad_client = "pub-9245378853208256"; /* Iowa City Blog Half Banner */ google_ad_slot = "7604527394"; google_ad_width = 234; google_ad_height = 60; </script><br /><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>Ryan Kopfhttp://www.blogger.com/profile/16318410460192759175noreply@blogger.com0tag:blogger.com,1999:blog-873313683701430997.post-47997053348253770172008-06-04T15:20:00.000-07:002008-06-04T15:24:50.242-07:00Setting up Fast CGI with GoDaddy (fcgi)Using fastcgi on GoDaddy is paramount to getting any sort of performance with your rails application. If you're not using fast cgi, you will be waiting around 20-30 every time you hit your program with a request. Basically, nothing would work well. Changing your program's settings is as simple as modifying one line in your .htaccess file. First, go to application_name/public/.htaccess and open it in a text editor such at Notepad. Then, change the following line:<br /><strong>RewriteRule ^(.*)$ dispatch.cgi [QSA,L]<br /><span style="font-weight: normal;">to<br /></span></strong><strong>RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]<br /><br /><span style="font-weight: normal;">This will tell GoDaddy to send requests to Fast CGI, which is much faster. The first request your program gets may take up to 20 seconds, but subsequent requests come at expected speeds. Unfortunately, GoDaddy has the tendency to kill fcgi processes after about 5 minutes, and you might get the occasional error or the speed reduction at this time.</span></strong>Ryan Kopfhttp://www.blogger.com/profile/16318410460192759175noreply@blogger.com0tag:blogger.com,1999:blog-873313683701430997.post-77041032833374629212008-06-04T15:08:00.001-07:002008-06-04T15:10:34.905-07:00Ruby on Rails LocationOne important thing to consider when trying to use Ruby on Rails with GoDaddy shared hosting is the fact that their ruby installation is not in the standard location. As a result, you will have to modify the shebang line to point to the correct spot. The default line is <span style="font-weight: bold;">#!/user/bin/ruby</span>, but you need to change this to <span style="font-weight: bold;">#!/usr/local/bin/ruby</span> to get any Ruby program to work with GoDaddy. You can find this line in the file application_name/public/dispatch.fcgi or /public/dispatch.cgi. You may want to poke around the /public folder for other places you may need to change it in.Ryan Kopfhttp://www.blogger.com/profile/16318410460192759175noreply@blogger.com0tag:blogger.com,1999:blog-873313683701430997.post-86101006931492005332008-06-04T15:03:00.000-07:002008-06-04T15:07:41.650-07:00Getting Ruby on Rails SetupGetting <span style="font-weight: bold;">Ruby on Rails</span> setup with a GoDaddy shared hosting account is rather difficult. This blog should hopefully take you step-by-step through the installation process. Remember there are a dozen things that can break a GoDaddy rails setup, which makes installing on GoDaddy's shared servers a pain. Fortunately, though, their low prices can in many cases make up for the extra work, especially if it's a small, personal project with little-to-no budget.<br /><br />Start by purchasing a GoDaddy shared hosting account, but you probably already have one. If you haven't, though, you'll have to ensure that you have a deluxe or premium account - the basic level accounts don't support cgi, perl, ruby, rails, or any of those things. You can buy three years with 20-30% off, totaling a little more than a mere $100. Remember, though, life would be a lot easier if you can afford your own server, a host that specializes in rails, or a virtual or dedicated server. I'm assuming you're already stuck with GoDaddy.Ryan Kopfhttp://www.blogger.com/profile/16318410460192759175noreply@blogger.com0tag:blogger.com,1999:blog-873313683701430997.post-57640317071713478942008-05-29T14:03:00.000-07:002008-06-29T14:05:16.290-07:00Ever Wanted Just Ruby?If you've ever needed just Ruby, without rails, there is a simple and effective way to do so with GoDaddy. All you need to do is to rename your program from (.rb) to (.cgi) and set Linux/Unix permissions on it to 0755 through your FTP client. This will allow your ruby program to be executed just like any php or perl cgi program on GoDaddy. Remember your first output still has to be something like<br /><br />puts "content-type: text/html\n\n"Ryan Kopfhttp://www.blogger.com/profile/16318410460192759175noreply@blogger.com0